Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Next Earnings Date Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
danielbender
Posted : Tuesday, April 27, 2010 4:52:20 PM
Registered User
Joined: 1/14/2006
Posts: 436

I am trying to create an indicator that will generate the next anticipated earnings date for a stock, in terms of days in the future, and display it in a watchlist column.  I think I have a workable approach, but I need some programming help. 

The starting point is the Earnings 1-yr indicator on a weekly graph (note, using a weekly chart is important, it wont work on a daily chart).   Then create a 1 period "rate of change (net)" child indicator.   Then generate a combined condition with 1) rate of change moving up, or 2) rate of change moving down.  This creates a spike graph, with a spike every 13 weeks or so.  That part is easy.

Now I need some help to take the latest spike (most recent Earnings Event), find its date, add 13 weeks to that date to generate the next anticipated Earnings Event,  then find the difference between the current date and the next Earnings Event in days, and then display that as an integer in a watchlist column.  If the number is small, I know the next EE is pending.  If the number is near 90, I know the next EE will be several months away.

If someone can figure out a simpler or more accurate method, that would be fine as well.

Thank you

Bruce_L
Posted : Wednesday, April 28, 2010 9:53:28 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Next Earnings Date
'|******************************************************************
'# Earnings = indicator.Library.Earnings 1-Yr
'# Cumulative
Static CountDown As Single
If isFirstBar Then
    CountDown = Single.NaN
Else If Earnings.Value <> Earnings.Value(1) AndAlso _
    Price.DateValue = Earnings.DateValue Then
    CountDown = 63
Else
    CountDown -= 1
End If
Plot = CountDown

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
danielbender
Posted : Wednesday, April 28, 2010 1:36:55 PM
Registered User
Joined: 1/14/2006
Posts: 436
Bruce - Thanks, that worked pretty well. 
jmeisen
Posted : Monday, October 10, 2011 5:34:03 PM
Registered User
Joined: 6/5/2010
Posts: 27

Bruce,
 I have applied this to my charts, and the indicator portion appears to work well, but when used as a watchlist column, the values are not the same as what is given in the indicator window.  

Any suggestions?

jm

jmeisen
Posted : Monday, October 10, 2011 7:16:44 PM
Registered User
Joined: 6/5/2010
Posts: 27

Bruce, please disregard the above post; I have found and now have included 

'# Cumulative 

Now the watch-list lists correctly.

Thanks,

jm

Bruce_L
Posted : Tuesday, October 11, 2011 8:34:29 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I am happy to read you were able to figure it out on your own.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
caution
Posted : Thursday, January 19, 2017 12:05:49 PM
Registered User
Joined: 5/5/2010
Posts: 185

Bruce,

Does the above code still works or is there a better way to have upcoming earnings included in the watchlist?

Bruce_L
Posted : Thursday, January 19, 2017 12:54:06 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The above code still works. I do not know of any other way to add earnings dates or upcoming earnings as a WatchList Column in StockFinder (it was added to TC2000 after SF stopped development).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.