TradingView
vitvlkv
Nov 10, 2015 12:30 PM

Fundamentals example 

Apple Inc.NASDAQ

Description

HOWTO Get Fundamentals data in Pine Scripts
Comments
vitvlkv
study("Fundamentals in Pine")
field = input("DIVIDENDS_PAID", title="EDGAR Field")
sym = tickerid("EDGR", ticker + "_" + field)
series = security(sym, "D", close, true)
plot(series, color=orange, linewidth=3, style=linebr)
ilamfev
Hi, very helpfull thanks!
It works for EBITDA Value, it doesnt work for MARKET CAP.
Any ideas?

study("Fundamentals in Pine")
field = input("MARKET_CAP", title="EDGAR Field")
sym = tickerid("EDGR", ticker + "_" + field)
series = security(sym, "D", close, false)
plot(series, color=orange, linewidth=3, style=linebr)
ilamfev
Here is the solution:
sym2 = tickerid("EDGR", ticker + "_" + "TOTAL_SHARES_OUTSTANDING")
shares = security(sym2,"D",close,false)
stock = security(ticker,"D",close,false)
mkt=stock*shares

Thank you! Appreciate it!
Gobstopper4663
If you need fundamental data on a quarterly time frame, then just add "QUARTER_" in front of the first parameter of the input function.
i.e. field = input("QUARTER_DEBT_TO_EQUITY", title="EDGAR Field")
Gobstopper4663
It's not working anymore. It compiles perfectly fine, but then error says ' resolve_error "EDGR '. Can anybody help?
Gobstopper4663
"Fundamental indicators are no longer available on TradingView."
Okay, never mind. I'll look elsewhere.
joapen
@Gobstopper4663, you are right, this is not working anymore. It's a pity, this adds a lot of value.
More