I can't make my strategy in backtesting to work, In log I see next error:
Strategy 'MyTest/-1':Error on calling 'OnExecutionUpdate' method on bar 1364: index was outside the bounds of the array.
Any cause for this? Thanks
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"MyTest."; Name = "MyTest"; Calculate = Calculate.OnBarClose; EntriesPerDirection = 1; EntryHandling = EntryHandling.AllEntries; IsExitOnSessionCloseStrategy = true; ExitOnSessionCloseSeconds = 30; IsFillLimitOnTouch = false; MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix; OrderFillResolution = OrderFillResolution.Standard; Slippage = 0; StartBehavior = StartBehavior.WaitUntilFlat; TimeInForce = TimeInForce.Gtc; TraceOrders = false; RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose; StopTargetHandling = StopTargetHandling.PerEntryExecution; BarsRequiredToTrade = 10; } }
Comment