I'm using 3-minute bar intervals and trying to open a position on S&P500 stocks the morning after quarterly earning release after the first 3-minute bar (i.e. at 6:33am ET).
Following is the code i used (similar to the function suggested above), but it reports every day as EarningsRelease day fiDays==0 every day - see below an excerpt of the PrintDebug log, showing every day for 1 stock AEE
How do i detect Earning Release date (one/quarter) and trade the morning after?
CODE:
Please log in to see this code.
ER Date+1= 9/19/2014,Stock=AEE
ER Date+1= 9/22/2014,Stock=AEE
ER Date+1= 9/23/2014,Stock=AEE
ER Date+1= 9/24/2014,Stock=AEE
ER Date+1= 9/25/2014,Stock=AEE
ER Date+1= 9/26/2014,Stock=AEE
ER Date+1= 9/29/2014,Stock=AEE
ER Date+1= 9/30/2014,Stock=AEE
ER Date+1= 10/1/2014,Stock=AEE
ER Date+1= 10/2/2014,Stock=AEE