Reputation: 115
Hey I am testing out pinescript of tradingview.
How can I get the number of shares outstanding for the stock using pinescript?
Upvotes: 0
Views: 2008
Reputation: 89
Supposedly you can do something like this (I am getting 0 for FLOAT_SHARES_OUTSTANDING
):
val = nz(request.financial(syminfo.tickerid, "FLOAT_SHARES_OUTSTANDING", "FY", ignore_invalid_symbol = true))
But it works for TOTAL_SHARES_OUTSTANDING
Upvotes: 0
Reputation: 8789
Financials appear on your chart as an indicator. You can use the values from one of those at a time in a script by hooking it up via an external output.
Upvotes: 1
Reputation: 8789
A new function is now available to access financials from Pine:
https://www.tradingview.com/blog/en/built-in-financial-functions-and-metrics-in-pine-17491/
Upvotes: 2