I have the following problem (simplified):
I enter a position via short stop order at the price of 10 (unmanaged). The High of that Bar (Bar where short stop was executed) is 12 which in realtime would of course be unknown when the short stop order is filled until the bar closes. After execution of that order I submit a buy stop order during OnExecutionUpdate at the price of 11 (unmanaged). The order is ignored because the High of the entry bar is higher than the Buy Stop price. If I submit the buy stop order at 12,01, everything works fine.
So basically NT will always ignore the stop order in the backtest when the bar of execution has a wide range which exceeds the stop price levels even though that bar is not loaded/closed in OnBarUpdate yet.
Questions:
- I know that this would be no problem in realtime but how can I avoid this in the backtest without using tick data?
- Is there a way that NT executes both the entry (shortstoporder) and the exit (buystoporder) in that same bar (so assuming that the High occured after the short stop order was executed)?
- How can I check the High and Low of the execution bar when the stop order is filled in OnExecutionUpdate (so basically looking one bar ahead of the most recent bar in OnBarUpdate in the historical data)?
Thanks in advance!

Comment