- Perhaps you should read the manual.
iMAOnArray
Calculates the Moving Average indicator on data, stored in array, and returns its value.
iMAOnArray - Technical Indicators - MQL4 Reference - Or just computed it.
#define EMA(P,C,L) ((P) + ((C)-(P))*2./(L+1)) ⋮ static double value=0, ema1=0, ema2=0; double Vp = value; value = …; double ema1p = ema1; ema1 = EMA(Vp, value, Length); double ema2p = ema2; ema2 = EMA(ema1p, ema2p, Length);
Thank you very much for the indication you gave me.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I'm a beginner for mq4 programming.
I would like help in programming a function that is the average of an average.
Knowing the EMA, how to program the EMA1 = f (EMA).
ES.
EMA = (period 12, exponential, price close)
EMA1 = (period 5, exponential, EMA).
Thanks to those who can help me.
Luciano