[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SP/ES rollover code



PureBytes Links

Trading Reference Links

  I use this code for automatic ascii file rollover but you
could easily put in an alert or whatever instead to change
your workspaces over. It's set up for 1st bar of the
rollday session in the DSP.
  To set it up for last bar on Wednesday, simply put the other
set of numbers in brackets and use the other set.
  I don't do ES but I assume it expires on Thursday morning
and there is only one session. In that case, just switch the
sessiontime brackets.

dbs

if dayofweek(d)=4{3}
  and dayofmonth(d)>7{6}
  and dayofmonth(d)<15{14}
  and fracportion(month(d)/3)=0
  and t={sess1endtime}sess1starttime+ barinterval
  then begin
     ...do whatever
end;