I m trying to run simple code
if (High[0] > High[1] && High[1] > High[2])
Print("Two successive higher highs");
DrawArrowDown("My down arrow" + CurrentBar, true, 0, High[0] + TickSize, Color.Blue);
I m getting "Error on calling the onBarupdate method for indicator Myindi on bar U:index was out of range.Must be non-negative and less than the size of the collection Parameter name:index"
it happen whenever i compare current bar with previous bar [1].its work fine if i compare current bar like Open[0] > Close [0]
Do i need to initialize something to run this code?
Thanks
mwave

Comment