The issue is,
[B][B][B][B][B][B][B][B][B][B]if(CurrentBars[0]<2 || CurrentBars[1]<1 || CurrentBars[2]<1) return;[/B][/B][/B][/B][/B][/B][/B][/B][/B][/B]
You have your primary data series, the series the indicator is applied to, then you have the secondary tick series. So you need a current bar check to prevent NT from processing if statements which will try to pull data further back than is available. For example if you try to reference the low of 10 bars ago, on the first bar update, you'll get a index error.
The problem is referencing CurrentBars[2], because no 3rd series is added to the script.
I suggest reading more about current bar checks,
I was able to get your indicator to plot when I removed the CurrentBars[2] part. I also required the 2nd series to have at least 10 bars, which may not be necessary.
Please let us know if you need further assistance.
Comment