Error on calling 'OnStateChange' method: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
The Strategy using what the ATR was on the previous bar (BarsAgo = 1) to determine Target and Stop orders.
It also is looking at the close of 2 Bars ago and comparing to the close of the previous bar (BarsAgo = 1).
Minimum bars to trade is set to 20, which should be/ is fine, as ATR period is set below that. Tried multiple values, that doesn't seem to be the culprit.
Comment