I think this can be simulated on an intraday chart by using intrabarordergeneration. For example, assuming that you're looking at a 5 minute bar of the e-Mini S&P 500 in Chicago (so the first bar of the day session has a timestamp of 8:35 am), you'd use something like:
Code: Select all
[intrabarordergeneration=true];
If Time = 835 and Open > CloseD(1) Then Buy Next Bar At Market;
SetExitOnClose; // Just to make sure you get out at the end of the day
When I put this on a 5 minute chart, and confirm that intrabarordergeneration is set to "on" in the strategy's properties, this shows me getting in at the open.
Technically, this code would wait for the market to first post a tick at the open in order to get into the trade, so you're not getting in precisely at the open (really the first tick after the market opens) but then again, a trader would also have to verify whether their criteria for entry is met before getting into the market.