user2081405
user2081405

Reputation: 115

Pinescript, getting number of shares outstanding

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

Answers (3)

PLy
PLy

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

PineCoders-LucF
PineCoders-LucF

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.

enter image description here

Upvotes: 1

PineCoders-LucF
PineCoders-LucF

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

Related Questions