Export (0) Print
Expand All

Weighted Moving Average Formula

The weighted moving average formula is a moving average of data that gives more weight to the more recent data in the period and less weight to the older data in the period. This formula smoothes a data series. This makes analyzing volatile data easier.

Syntax

Chart.DataManipulator.FinancialFormula(
    FinancialFormula.WeightedMovingAverage,
    "Period",
    "Price",
    "WMA")

Parameters

This formula takes one required parameter.

Period
Period for calculating the weighted moving average.

Input Values

This formula takes one input Y value.

Price
Price for which the weighted moving average is calculated.

Output Value

This formula outputs two Y values.

WMA
Weighted moving average.

The Line chart type is a convenient chart type to display the formula output.

The following example takes input from Series1's second Y value (Series1:Y2) and outputs a 20-day weighted moving average on Series2's first Y value (Series2:Y).

Chart1.DataManipulator.FinancialFormula (FinancialFormula.WeightedMovingAverage, "20", "Series1:Y2", "Series2:Y");




Build Date:

2012-08-02
Show:
© 2014 Microsoft