| 1/4/2025 4:14:38 PM | Default | Strategy 'X': An order has been ignored since the stop price ‘18576.75’ near the bar stamped ‘01/22/2024 07:05:00’ is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored. |
I read lots of topics related to this issue on this forum. On Backtesting I resolved it by adding tick data
AddDataSeries(Data.BarsPeriodType.Tick, 1);
entryOrder = EnterShortLimit(1, true, 1, 19000, "EntryShort");
ExitLongStopMarket(1, true, execution.Order.Filled, finalTP, "EntryLongExit", execution.Order.Name);
ExitLongLimit(1, true, execution.Order.Filled, finalSL, "EntryLongTP", execution.Order.Name);
Now, I expect that finalSL and finalTP should be correct because I am calculating it with execution.Order.AverageFillPrice + TP or execution.Order.AverageFillPrice - SL
When I am backtesting my strategy, error is gone, but during optimization I still see this error in Logs.
How can I deal with this?
Update:
I have Data Series configured like this both for Backtesting and Optimization
Price based on: Last
Type: Minute
Value: 1
I can't choose another option because I am loading multiple timeframes in my strategy like 1m, 5m, 15m, 1h and it won't let me

Comment