Highest High Value in the FOR loop

#1
Hi Programmers!

Maybe my problem is an easy task, but for me. So, how can I get the Highest High Value of the last 100 bars when I'm using the below formula:

for( i = 0; i < BarCount; i++ ) {
...
}


Out of the For loop, I can use this code: my_hhv = HHV( H, 100 );

I tried this, but it doesn't work:

for( i = 0; i < BarCount; i++ ) {
my_hhv = HHV( H, 100 );
}


I get the Error code number 8: Type mismatch, the value assigned to the array element has to be a number. You can not use array on the right -side of this assignment.

Thanks in advance.

Relative
 

Similar threads