Right now I am trying to identify if the current bar has a high that is higher than the previous 4 bars.
My logic looks like this
var2 = MAX(High, 3)[1];
if (High[0] > var2)
var3=1;
else var3=0;
if (var3==1)
DrawArrowDown("tag1" + CurrentBar, true, 0, High[0] + TickSize, Color.Red);
when I compile the indicator I get no plots on the screen.
if I change the MAX(High,3)[0] and the if(High[0} == var2) it works.
I can't seem to figure out why MAX(High,3)[1] doesn't work. Should this not contain the highest bar price for the last three bars beginning one bar ago? Therefore I am checking if the current bar high is greater than the highest high of the previous 3 bars.
Comment