GT::Indicators::SWMA

The Sine-Weighted Moving Average (SWMA) is a moving average using a sine factor to take into account both time and price movements. Very good at catching tops and bottoms, while filtering out unnecessary noise.

Calculation

SWMA = ( Sum of (sin(n*180/6*PI/180) * Close(i)) for i = 1 to i = period ) / (Sum of (sin(n*180/6*PI/180)) for i = 1 to i = period)

Examples

GT::Indicators::SWMA->>new() GT::Indicators::SWMA->new([30, {I:Prices OPEN}])

Links

http://www.ivorix.com/en/products/tech/smooth/swma.html

GT::Indicators::SWMA::calculate($calc, $day)