Is there a reliable way (in backtest mode) to place a Stop Order at the end of the day for execution on the open (8:30 AM for the mini S&P, with a Close Time of 3:15 PM) the next day, even for markets that aren't guaranteed to have a 1 minute bar in the last minute of the session?
I am currently doing this by placing the Stop Order OnBarUpdate() of the 1 minute bar series (The 0th data series in a Multi-Timeframe strategy), if the following is true of the 1 minute bar:
Convert.ToDateTime(Times[0][0]).TimeOfDay.TotalMinutes == DateTime.Parse("1/1/2000 3:15 PM").TimeOfDay.TotalMinutes
The problem, is that what if the 3:14 - 3:15 PM time range has no data?... Then my orders would not get placed for the next day.
I want to ensure that the order can get executed even on the 8:30-8:31 AM bar, not wait until the 8:31-8:32 AM bar.
Any ideas on a method I can use to guarantee placement for execution on the open of the next day?
Thanks in advance!
ChiTrader2000

Comment