Here is a concrete example (Calculate = Calculate.OnBarClose):
a second data series added for orderfill: AddDataSeries(BarsPeriodType.Tick, 1);
stopPrice = RoundToTickSize(stopPrice > Bars.GetOpen(CurrentBar + 1) ? stopPrice : Bars.GetOpen(CurrentBar + 1) + TickSizeValue); SubmitOrderUnmanaged(1, OrderAction.BuyToCover, OrderType.StopMarket, bracket1Qty, stopPrice, stopPrice, oco1, signalName1);
2. entry short @ 12782.75 stop @ 12782.75 ???
the stop is at the same price as the askprice which logically becomes a problem. my question now is how can i adjust the stop price for the historical part of the strategy so that if it is equal to or higher than the askprice it is automatically set to askprice + 1 tick?
I am only concerned with the State.Historical mode, the State.Realtime is clear to me.
Comment