I have an indicator that plots the percent change in price from current day open on three instruments -- found the code on YouTube and modified it for my purposes. These instruments are each added to the indicator via a one tick series. The calculated values plot as desired, as well as a summation of the calculated plots.
However, when I try to access these plots through another indicator (like trying to take an HMA of the one of the plots), either through an indicator or a strategy, I get the following errors:
- Indicator 'PCsum2' (the name of the custom indicator): Error on calling 'OnBar'Update' method on bar 20: Index was outside the bounds of the array.
- Indicator 'HMA' (trying to take an HMA of one of the plots): Error on calling 'OnBar'Update' method on bar 1: You are accessing an index with a value that is invalid since it is out-of-range.
- Indicator 'WMA' (not sure why this shows up, I'm using an HMA...): Error on calling 'OnBar'Update' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range.
Attached is the indicator code. Can anyone point me in the right direction?
Many thanks!

Comment