Can you pls explain why I get this error on the log when I`m backtesting a strategy using Order Fill Resolution = HIGH, Type = Minute and Value = 1.
01-04-2016 15:30:00 SL=17020 Ask=16912 Bid=16912 Close=16912
Strategy 'AuSBreakOut/-1': A Sell stop order placed at '1/4/2016 3:30:00 PM' 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.
The backtest was on YN ##-## and I printed the values of the SL price along with the current ASK, BID and Close[0] prices.
The statement that has this error is:
double dblStopPrice = Instrument.MasterInstrument.RoundToTickSize(execut ion.Order.AverageFillPrice - ((double)IntInitialRiskTicks * TickSize));
stopOrder = ExitLongStopMarket(0, true, execution.Order.Filled, dblStopPrice , cstrSignalName_SL, cstrSignalName_BuyStop);
The strategy only receives this one log error, yet successfully completes several other trades without any log entries.
Also, the strategy has no log errors when it is executed using Order Fill Resolution = Standard.
What Close price is NT talking about when it says my stop price is less than or equal to a the close price of the current bar ?
The stop price is 17020 and Close[0] = 16912.
Thanks
Comment