VMA - Variable Moving Average

Description

This variation of an EMA automatically smoothes any fluctuations in the market, and its sensitivity grows as more weight is placed on more recent data.

The VMA attempts to get rid of the disadvantages of other moving averages by automatically regulating the smoothing constant. This is why the VMA can be implemented for most of the market conditions, and is in a few cases actually better than other averages.

Caution The VMA is not to be confused with the Volume Moving Average (VolMA)!

Usage

VMA(int period, int volatilityPeriod)
VMA(IDataSeries inSeries, int period, int volatilityPeriod)
VMA(int period, int volatilityPeriod)[int barsAgo]
VMA(IDataSeries inSeries, int period, int volatilityPeriod)[int barsAgo]

Return value

double

When using this method with an index (e.g. VMA(9,9)[int barsAgo] ), the value of the indicator will be issued for the referenced bar.

Parameters

inSeries Input data series for the indicator

period Number of bars included in the calculations

volatility period Number of bars included in the calculation for the signal line

Visualization

Example

//Output the VMA value
Print("The current VMA value is " + VMA(9, 9)[0]);

Last updated