PureBytes Links
Trading Reference Links
|
Kevin
> I would like to create an exponential moving average formula but with a
> different weighting to that which Metastock provides as standard.
>
> Help!
This is the base formula for a standard exponential moving average.
{Exponential Moving Average}
A:=Input("Periods",1,99,14);
B:=P; {target array, usually CLOSE}
R:=2/(A+1);
If(Cum(1)=1,B,PREV*(1-R)+B*R);
This is the base formula for Wilders Smoothing (exponential) moving average.
{Wilders Smoothing}
A:=Input("Periods",1,99,14);
B:=P; {target array, usually CLOSE}
R:=1/A;
If(Cum(1)=1,B,PREV*(1-R)+B*R);
Notice how the only difference is the 'R' variable. This determines the
percentage of new data that is added and old data that is retained.
Hope this helps.
Roy
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|