So basically, before now it has used High[0]-Low[0]....I'm trying to use if statements to see which close is higher than the other and then say the higher close minus the lower close. So considering yesterday's close was higher than today's, I'd use Close[1] - Close[0]. This is where I run into a problem...it all works when I only reference the first index of the array, but as soon as I go to the 2nd or any further back, it ceases to work. So it will work if I say Close[0]-Open[0], it still will calculate a value. However, as soon as I change the index from 0 to anything else, it won't work.
The line I'm editing is #47.
atr1.Set(High[0] - Low[0]);
Attached is the indicator.
Thanks
Comment