Traders' Tips from TASC Magazine

How Smooth is Your Data Smoother

The article "How Smooth is Your Data Smoother", by Patrick E. Lafferty, reviews different types of moving averages, including a Sine-Weighted Moving Average. The Sine-Weighted Moving Average can easily be created in MetaStock 6.5 or higher. In MetaStock select the "Indicator Builder" from the "Tools" menu. In the Indicator Builder click "New" and enter the following:

Name: Sine-Weighted Moving Average

Formula:

PI:=3.1415926;
SD:=180/6;
S1:=Sin(1*180/6)*C;
S2:=Sin(2*180/6)*Ref(C,-1);
S3:=Sin(3*180/6)*Ref(C,-2);
S4:=Sin(4*180/6)*Ref(C,-3);
S5:=Sin(5*180/6)*Ref(C,-4);
Num:=S1+S2+S3+S4+S5;
Den:=Sin(SD)+Sin(2*SD)+Sin(3*SD)+Sin(4*SD)+Sin(5*SD);
Num/Den

Next click Ok and Close out of the Indicator Builder. Open a chart and plot the new formula by dragging it from the Indicator QuickList or by using "Indicators" from the "Insert" menu.


Contents