Highest / Lowest

 

Hi, I need to calculate the Highest Value of a Moving Average in the most recent 20 bars.

I think I can’t use the iHighest function...

Anyone can halp me?

Thank you!

 
Use iHigh(iHighest(..., ..., ...));
 

Could you kindly make an example? I don't understand where to indicate the moving average in the iHighest function.

Thank you

 

Oh excuse me, I misread your question...

...

double array[21];

for(int i = 20; i >= 0; i--){

array[i] = yourMovingAverageValue[i];

}

double theHighest = ArrayMaximum(array, WHOLE_ARRAY, 0);

Reason: