Moving Average - Variable (VMA)
<< Click to Display Table of Contents >> Moving Average - Variable (VMA) |
A Variable Moving Average is an exponential moving average that automatically adjusts its smoothing percentage based on market volatility. Giving more weight to the current data increases sensitivity thus making it a better signal indicator for short and long term markets.
VMA(int period, int volatilityPeriod)
VMA(ISeries<double> input, int period, int volatilityPeriod)
Returns default value
VMA(int period, int volatilityPeriod)[int barsAgo]
VMA(ISeries<double> input, int period, int volatilityPeriod)[int barsAgo]
double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.
input |
Indicator source data (?) |
period |
Number of bars used in the calculation |
volatilityPeriod |
The number of bars used to calculate the CMO based volatility index |
// OnBarUpdate method of a strategy |
You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.