I place EnterLongStopMarket orders at the high of the current bar but the following bar has an unfilled gap so the stop order price never gets touched by the following bar. I would expect the order to get executed and instead is completely skipped. Does this happen in real life? I think not, so I believe this is a bug. I am attaching a picture to show the behavior. The order at bar 161 should get executed at bar 162 but it is not.
The code at bar 162 is
if (Position.MarketPosition == MarketPosition.Flat {
EnterLongStopMarket(1, High[0], "LSM"); // i.e. EnterLongStopMarket(1, 20214.5, "LSM").
}
I debugged it and the position is Flat and the values are correct.
Best
Gio

Comment