I believe I may have recreated this issue using your code Chels. I modified it slightly to enter at 20:55 on the 27th June 2023 (my time at least) with a stop of 4679.75 I can get it to "fill" the stoploss even though the bar's Highs have not reached that price. The strange thing is that the execution log is coming in on the candle that makes sense at 12:00AM the next day. However this execution timestamp is occurring in between an 8:00PM and a 10:05PM log. Perhaps I am not understanding how the backtester is processing bars, but it seems like we are jumping back and forward through time in the backtest here. How could we fill an order on the 12:00AM primary bar but have yet to process the 10:05, 10:10, 10:15, etc. bars on the alternate data series?
Let me know what you make of the logs.

Comment