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.
WMA(5) = (1/15) * (5 * Close(i) + 4 * Close(i - 1) + 3 * Close(i - 2) + 2 * Close(i - 3) + 1 * Close(i - 4))
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
To install Finance::GeniusTrader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::GeniusTrader
CPAN shell
perl -MCPAN -e shell install Finance::GeniusTrader
For more information on module installation, please visit the detailed CPAN module installation guide.