This line of code:
double next = EMA(8)[1];
is throwing this error:
Error on calling 'OnBarUpdate' method for indicator 'ema8slope' on bar 0: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
If I call "Print(EMA(8).Count);" it shows a value of 50.
What's going on?
thanks.
john
Comment