Rank: Member
Groups: Registered, Registered Users Joined: 10/26/2012(UTC) Posts: 19
|
Hi, When using MOV with an exponential weighting, what is the decay rate of the weighting?
'PERIODS' presumably gives the length of the window.
But will a point 10 periods ago have half the weight of the point 1 period ago? Or quarter? Or 1/e?
Lastly, is it possible to specify the decay rate?
Thanks all
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Have a look in the MS User Manual, it's explained there.
wabbit[:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/26/2012(UTC) Posts: 19
|
Oh OK, looking at p 338 of the version 11 manual, the rate is derived from the time periods. Got you. Thank you for pointing me in the right direction, cheers.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Tim
What the manual probably doesn't tell you is how similar an EMA is to Wilders Smoothing. Other than the the starting or seeding value the only difference is the Rate calculation. Apart from the seeding value Wilders(C, N) is the same as Mov(C, 2*N-1, E).
{Exponential Moving Average} Periods:=Input("Periods",1,1000,25); Rate:=2 / (Periods + 1); If(Cum(1)=1, C, C*Rate + PREV*(1-Rate));
{Wilders Smoothing} Periods:=Input("Periods",1,1000,25); Rate:=1 / Periods; If(Periods>=Cum(1), Mov(C, Periods, S), C*Rate + PREV*(1-Rate));
Roy
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/9/2012(UTC) Posts: 169
|
Exponential MAs are confusing to a lot of folks since the last value of a 20-period EMA with 1000 periods loaded in the chart will be slightly different than one with just 100 periods loaded. It drives people crazy and results in a fair number of calls to our tech support.
--john
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/26/2012(UTC) Posts: 19
|
Yes, the problem is that for an exponential average, 'PERIODS' is used to calculate the decay rate, rather than being a window length (which is what you'd expect given the name and how it's used for the other moving averages).
Personally I think it'd be clearer, for the exponential average, to retain the 'PERIODS' to mean window length, and explicitly supply a decay rate - but I realise it could be difficult to introduce this with legacy code, and also that possibly this isn't the way that chartists tend to think about it.
Anyway, thank you for your input, best, Tim
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/9/2012(UTC) Posts: 169
|
The EMA as currently constituted is the accepted and correct way (going back decades). Perhaps however a new type of MA could be introduced where the decay takes place only inside the defined "window". I'm sure a custom indicator could be written to accomplish this.
--john
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.