WMA

WMA ( int length);

Default values:

length: 9

Description

Returns Weighted Moving Average value. The Weighted Moving Average is calculated by multiplying each of the previous days' data by a weight factor. That factor is equal to the number of days past the first day. The total is then divided by the sum of the factors.

Input parameters

Parameter Default value Description
data - Defines data for which the average is found.
length 9 Defines period on which the average value is found.

Example

plot WMA = WMA(close, 20);

The example displays the weighted moving average for the last 20 closing prices.