MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Sine-Wave Weighted Moving Average by Patrick E. Lafferty
June 1999 TASC Traders Tip - How Smooth is Your Data Smoother?
(Sine-Wave Weighted Moving Average) {#&} The article "How Smooth is Your Data Smoother", by Patrick E. Lafferty, reviews differenttypes 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 name (shown below in Bold font) in the Name field.Then place the formula in the Formula field in the Indicator Builder:

Sine-Wave Weighted Moving Average

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 IndicatorQuickListor byusing "Indicators" from the "Insert" menu.

Formula by Cheryl Elton,
Equis International

Source / From: TOP
http://www.equis.com

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.