TradingView
MichelT
2020年2月19日午前11時42分

Earnings, Splits, Dividends 

Apple Inc.NASDAQ

詳細

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
コメント
PineCoders
Gero6
How to show dividend and earnings in tradingview
manu_el_mngmt
@Gero6, click on the "gear symbol" on the top bar (next to fullscreen mode button) > select "Events" from the menu on the left > enable "show Earnings on chart".
You'll be able to see them on every timeframe, as long as you zoom in the chart enough (usually on M or W charts you need to zoom in before seeing them).
I hope this will be useful.
taso42
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.
Trade_Rational
@taso42, Did you ever end up finding a solution for this? It's 3 years on and it seems to me like there is no simple solution for this yet... struggling with the same problem. To me it seems so basic that some strategies would rely on closing a position before an earnings date.
Daveatt
Pretty cool !!!

Is there any other data (or documentation you can point me to) we can access using the "ESD_FACTSET:"?
MichelT
@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.
Daveatt
@MichelT, Thank you, very clear !!!!
livingdraculaog
Thank you for posting this. There aren't many scripts
Do you know how to get the ex-dates, get the average dividend per pay, or check if they (change) payout monthly, quarterly?

I'm testing out a fairly complex strategy that uses monthly dividends to buy quarterly stock and then use margin after their payout to increase position of the stocks about to have an ex-date.
JakeTheSnake3p0
Is it possible to get the future expected earnings report date? I see that TV produces them in their ESD-lollypops but I'm unsure of how to access it through this method or any other.
詳細