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

Finance::GeniusTrader::Indicators::WMA

Overview

The Weighted Moving Average (WMA) is designed to put more weight on recent data and less weight on past data. A weighted moving average is calculated by multiplying each of the previous day's data by a weight.

Calculation

WMA(5) = (1/15) * (5 * Close(i) + 4 * Close(i - 1) + 3 * Close(i - 2) + 2 * Close(i - 3) + 1 * Close(i - 4))

Examples

Finance::GeniusTrader::Indicators::WMA->new() Finance::GeniusTrader::Indicators::WMA->new([50]) Finance::GeniusTrader::Indicators::WMA->new([30], "OPEN", $GET_OPEN)

http://www.equis.com/free/taaz/movingaverages.html

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