If I use those parameters I get the following errors:
2/13/2018 17:19 Default Indicator 'Swing': Error on calling 'OnBarUpdate' method on bar 1: 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.
Also, I attached the strategy that demonstrates the errors...
1. Load a chart of any instrument you like -
2. I used the YM on 12 tick Range Bars.
2. Tick the Tick Replay check box.
3. Now load the strategy and set Calculate = OnPriceChange.
4. Start the strategy.
Note: if you set Calculate = OnBarClose, it works. Tick Replay in conjunction with OnPriceChange or OnEachTick is how you need to go to reproduce the error, which of course is how I need to work in my strategy.
Note: It apparently works fine on any other bars with Tick Replay checked and Calculate = OnPriceChange or OnEachTick. You need to use Range bars to get it to fail.
If the fix is in the bars and not the indicator, can you tell me what you did to fix it so I can also fix it in the bars I'm using? I'm using a variation of a Range bar and that's where the errors first appeared.
Comment