I use a custom session time in TS set to end at 3:59 PM and the
following code to exit EOD:
SetExitOnClose;
P.S. I have also tested other session end times for the last 5
minutes of the regular session for the SRS 15 min system and
find that 3:59 PM is the optimum time for EOD exit.
The SetExitOnClose statement does not work for automated trading
at regular session end time of 4:00 PM, but works fine for custome
session times ending before 4:00 PM.
Carey
Newsletter
Subscribe to our email list for regular free market updates
as well as a chance to get coupons!
EOD exit
End of day exits on TS
Posted by cdjd on 20th of May 2009 at 09:31 pm
inputs:barsBefore EOD(2);
variable: SessionEnd(0);
if date <> date[1] then
SessionEnd=calctime(Sess1EndTime,-barsbefore EOD*BarInterval) ;
if time >= SessionEnd then sell(" EOD") next bar market;
first" IF" statement is acted upon each new day at first bar and calculates when session ends (usually 4:15)
I use a custom session
Posted by cnaquin on 20th of May 2009 at 10:25 pm
I use a custom session time in TS set to end at 3:59 PM and the following code to exit EOD:
SetExitOnClose;
P.S. I have also tested other session end times for the last 5 minutes of the regular session for the SRS 15 min system and find that 3:59 PM is the optimum time for EOD exit.
The SetExitOnClose statement does not work for automated trading at regular session end time of 4:00 PM, but works fine for custome session times ending before 4:00 PM.
Carey