Two indicators in the same chart window - page 2

 
mactresa:

how to calculate the max value out of a buffer ?

let said we have :


for(int i=0; i<limit; i++)

pleasehelp[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);

abspleasehelp[i]=MathAbs(pleasehelp[i]);

i need to know the greater value of it in the WHOLE_ARRAY

I have tried: 1 - High[iHighest(MathAbs(Null),0,abspleasehelp[i],WHOLE_ARRAY,0)];

2 - Mathmax....

I need only one value out a arrays (and i remind us the value inside that array are double type);
Thanks, Best regards

as phy have mentioned, you just have to keep the high value along the for loop. samething like this:


MAX=pleasehelp[i];
if( MathAbs(pleasehelp[i] > MAX) MAX = pleasehelp[i];

so that MAX is going to be always the greater value of your array pleasehelp[i].


have fun, and make a lot of pips,,,

Reason: