wrsmallcap
Pine Script Rookie
Pine Script Rookie
Posts: 3
Joined: September 13th, 2020
Contact: TradingView Profile

How to get stock basic informaton (e.g. total shares issued, total shares outstanding) to calculate turn over ratio?

I want to develop a script to plot the stock turn over ratio, which is basically a calculation of volume / outstanding float. The problem is how to get the stock information of total number of shares outstanding in float?
In addition, are there built-in functions to get company basic information, e.g. total revenue, enterprise value, EPS?
Thanks in advance for help.

User avatar
Matthew
Site Admin
Site Admin
Posts: 92
Joined: July 1st, 2020
Location: Australia
Contact: Website Facebook Twitter TradingView Profile

Re: How to get stock basic informaton (e.g. total shares issued, total shares outstanding) to calculate turn over ratio?

Hi wrsmallcap!

I believe what you're trying to do is possible. You can get the financial info of a stock using the inbuilt Financial Function and passing it the relevant data IDs.

As for total shares issued vs outstanding, in the link above there is more info regarding how to do that but this snippet of code will get the data you want:

Code: Select all

TSO = financial(syminfo.tickerid, "TOTAL_SHARES_OUTSTANDING", "FQ")

Unfortunately I don't have time to help any further than that but there are some lessons in the Pine Script Mastery Course covering stock financials and the QUANDL function which you might find helpful if you can't work it out on your own.

Good luck with your project my friend :cool: let us know how you go!

Return to “Pine Script Q&A”