My stop order in OnExEcution has been working fine most of time. However, twice, the stop price submitted is 0.0001 for all orders in the strategy.
stopOrder1 = ExitShortStop(0, true, execution.Order.Filled, High[1]+1*TiCkSize, "SL_S1", "S1");
By checking the price movement at second level, there is gap in one case. For the other case I did not record price at second level so cannot tell. I could not figure out a reason other than specualting that referring bar price like High[1] in OnExecution needs an incoming live tick. If no live tick, the High[1] is zero and hence the stop price is 0.0001 (TickSize 0.00005 rounded to 0.0001 in Forex).
It is hard to believe High[1] value will be lost when no tick coming. But that seems to be an explnation.
Any comments are welcome so i can look to the right direction.
Comment