The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Finance::GeniusTrader::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

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

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

Finance::GeniusTrader::Indicators::SWMA::calculate($calc, $day)