One of the conditions of my custom indicator is that it draws an arrow on the chart every time the high of a candle is lower than the high of at least one of the highs of the last ten candles. Is there a more efficient way to code this than to include every possible situation in the code?
Currently it looks like this:
if(High[0] < High[1] || High[0] < High[2] || High[0] < High[3] || etc until High[10]
I'm looking for the correct version of something like:
if(High[0] < High[1-10]
Thanks
Comment