"A BuyToCover stop order placed at '9/1/2016 9:05:00 AM' has been ignored since the stop price is less than or equal to the close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy." I have multiple of these errors, I assume because the strategy is setting these limits a bar late and occasionally the price moves through the limit which isn't set yet.
Below is the code that NT seems to be passing over:
EnterLong(TradeSize, "longEntry");
takeProfit= ExitLongMIT(0, true, TradeSize, LongSMA + ProfitMult*LongATR, "longProfit", "longEntry");
takeLoss= ExitLongStopMarket(0, true, TradeSize/2, LongClose - LossMult*LongATR, "atrExitLong", "longEntry");
Any ideas why it skips over the exit limits would be appreciated.
Thanks,
John
Comment