MichelT

Earnings, Splits, Dividends

Example of requesting Earnings , Splits, Dividends using pine-script.

That way is inner representation of data in TradingView, so it can be changed any time. It's just an example of requesting of the data.

Description of the series.

Earnings:

time: report date (unix time stamp)
open: estimate value
low: reported value
close: actual value
high: fiscal period (unix time stamp)


Splits:

time: split date (unix time stamp)
close: split denominator
open: split numerator


Dividends:

time: ex-dividend date (unix time stamp)
close: amount
開源腳本

秉持真正的TradingView精神,該腳本的作者將其開源發佈,因此交易者可以理解和驗證它。為作者加油!您可以免費使用它,但是在發佈中重複使用此程式碼受網站規則的約束。您可以把它加入到常用以在圖表上使用它。

想在圖表上使用此腳本?

評論

500 代幣
回覆
How to show dividend and earnings in tradingview
+6 回覆
This is very useful, thanks for sharing.

I'm trying to use earnings in a strategy/backtest -- I want to close open positions before earnings are reported. So far I am unsuccessful because strategy.close_all() executes on the next bar. I want it to execute on the current bar, which means, I need to access the next bar's earnings. Normally accessing the future wouldn't make sense in a backtest, but since earnings dates are known in advance I think it's sound to use them.

Do you happen to know how I can accomplish this? I'm still very new to pine script.
+2 回覆
Pretty cool !!!

Is there any other data (or documentation you can point me to) we can access using the "ESD_FACTSET:"?
+1 回覆
MichelT Daveatt
@Daveatt, no, it's a special case used for exact those ESD-lollypops in the chart. The rest of data (from the 'Financials' tab in the chart window) is requested in the other way and there will be a method fundamentals() soon (I expect in the nearest weeks), so it'll be possible to get the fundamental data (e.g. quarterly earnings) via it. Actually, for those ESD-data there also will be special functions, but I don't have any ETA for them, so I just published the workaround, so you guys could get the data till the better solution come up.
+3 回覆
Daveatt MichelT
@MichelT, Thank you, very clear !!!!
+1 回覆
Es perfecto pero muy tarde
+1 回覆
Killing it like usual MichelT!
+1 回覆
You made my day @MichelT! Clean code, meaningful description & code comments. Thank you!
+1 回覆
MichelT e2e4mfck
@e2e4mfck, You are welcome!
+1 回覆