in OnOrderUpdate, I set ExitLongLimit Order to make a protective stop.
However, it exits on same bar, and what's the main thing here - it exits on the previous price (which havent been hit after entry).
After that,i've found that I should have used ExitLongStopMarket, and it will work well.
but, now i face another problem. I tested 2 variations with same chart:
if 1st , i use:
ExitLongStopMarket(0, true, 1, order.AverageFillPrice - TickSize, ...)
in 2nd , i use:
ExitLongStopMarket(0, true, 1, order.AverageFillPrice, ...)
and as you see, 2nd chart doesnt trigger exit. Why? the only difference is `-TickSize`
Comment