EMA[i] = pr*Close[i] + EMA[i+1]*remainder of pr<br / translate="no"> pr=25.0/(1+period)
pr=25.0/(1+period) - where did it come from? The formula is different, with two instead of 25. OK, here's the right formula for EMA, nonrecurrent - without any equivalent periods (as Svinozavr pointed out):
i.e. the weight of the cloz is ten times less than the previous one, which is also ten times less than the previous yema, right? but then it's nothing at all, is it?
Well look at the last formula: ema[i] = pr*Sum( (1-pr)^(k-i) * Close[i+k] ; k = i..infinity) The weight of each cloze decreases exponentially as it moves deeper into history, but still not very fast. Let's say the weight of the first one is 0.2. Then the second is 0.2*(1-0.2) = 0.2*0.8^1 = 0.16 the third is 0.2*0.8^2 = 0.128 the fourth is 0.2*0.8^3 = 0.1024 etc.
eddy>>: т.е. вес клоза в десять раз меньше предыдущей, вес которой тоже в 10 раз меньше предыдущей ема, так? но ведь тогда он вообще ничтожен, разве нет?
For what is negligible? Well, output the EMA in the terminal by converting 0.1 to a period and see.
Or here, a rectangular signal with a period of 100 bars is smoothed by the EMA with coefficient 0.1:
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
ема=доля от клоз0 + "1-доля" от ема предыдущей
как это 1-доля?
EMA = 0.1*Close + (1-0.1)*EMAprevios; i.e. EMA=0.1*Close + 0.9*EMAprevios;
What is not clear here?
pr=25.0/(1+period)
OK, here's the right formula for EMA, nonrecurrent - without any equivalent periods (as Svinozavr pointed out):
ema[i]=pr*Close[i] + (1-pr)*ema[i+1] =
pr*Close[i] + (1-pr)*(pr*Close[i+1] + (1-pr)*ema[i+2]) =
pr*Close[i] + pr*(1-pr)*Close[i+1] + (1-pr)^2*ema[i+2] =
pr*Close[i] + pr*(1-pr)*Close[i+1] + (1-pr)^2*(pr*Close[i+2] + (1-pr)*ema[i+3]) =
pr*Close[i] + pr*(1-pr)*Close[i+1] + pr*(1-pr)^2*Close[i+2] + (1-pr)^3*ema[i+3]) = ... =
pr*Sum( (1-pr)^(k-i) * Close[i+k] ; k = i..infinity)
Forget about the equivalent period, it's nonsense.
The weight of each cloze decreases exponentially as it moves deeper into history, but still not very fast.
Let's say the weight of the first one is 0.2.
Then the second is 0.2*(1-0.2) = 0.2*0.8^1 = 0.16
the third is 0.2*0.8^2 = 0.128
the fourth is 0.2*0.8^3 = 0.1024 etc.
т.е. вес клоза в десять раз меньше предыдущей, вес которой тоже в 10 раз меньше предыдущей ема, так? но ведь тогда он вообще ничтожен, разве нет?
For what is negligible? Well, output the EMA in the terminal by converting 0.1 to a period and see.
Or here, a rectangular signal with a period of 100 bars is smoothed by the EMA with coefficient 0.1: