Tuesday, April 12, 2011

How Smooth is Your Data Smoother-Wave Weighted Moving Average

How Smooth is Your Data Smoother-Wave Weighted Moving Average

The article "How is your data smoother Smooth" by Patrick E. Lafferty, reviews different types of moving averages, including Weighted Moving Average sinus. The Weighted Moving Average sinus can easily be created in MetaStock 6,5 or higher. In MetaStock select "Indicator Builder" from the "Tools" menu. In the Indicator Builder, click the "New" and enter the name (shown below in bold) in the Name field. Then place the formula (full text after the "formula" and before "* END * THE FORMULA") in the field in Formula Indicator Builder:

NAME: Sine Weighted Moving Average

Formula:

June: = 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);
No.: S1 + S2 => S3 + + S4 S5;
Day: = sin (SD) + Sin (2 * SD) + Sin (3 * SD) + Sin (4 * SD) + Sin (5 * SD);

NUM / day

* * END OF FORMULA

No comments:

Post a Comment

Powered by Blogger.