Exponential Moving Average Formula (Chart Controls)

The exponential 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 produces a moving average that follows the market trend much more quickly than the Weighted Moving Average Formula.

This formula smoothes a data series. This makes analyzing volatile data easier.

Sample plot of the exponential moving average

Formula Details

Syntax

Chart.DataManipulator.FinancialFormula(
    FinancialFormula.ExponentialMovingAverage,
    "Period",
    "Price",
    "EMA")

Parameters

This formula takes one required parameter.

  • Period
    Period for calculating the exponential moving average.

Input Values

This formula takes one input Y value.

  • Price
    Price for which the exponential moving average is calculated.

Output Value

This formula outputs one Y value.

  • EMA
    Exponential moving average.

Remarks

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

Example

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

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

See Also

Reference

Simple Moving Average Formula
Triangular Moving Average Formula
Weighted Moving Average Formula
System.Windows.Forms.DataVisualization.Charting
System.Web.UI.DataVisualization.Charting

Concepts

Applying Formulas

Other Resources

Moving Averages