All indicators

Variable Moving Average

Jan 2, 2015

Static chart image
Moving AveragesVolatility

The Variable Moving Average indicator provides an adaptive exponential moving average that automatically adjusts its smoothing constant based on market volatility to improve trend responsiveness.

Usage

The Usage section describes how the script can be used, examples should be provided in this section. This section also focuses on how main settings affect the indicator interpretation and output.

The Variable Moving Average (VMA) is used similarly to a standard Exponential Moving Average (EMA) but offers greater sensitivity during volatile price movements and increased stability during consolidation. Traders can use the VMA to identify trend direction, potential support and resistance levels, and momentum shifts.

  • Trend Identification: When the VMA line is rising, it indicates a bullish trend. When the VMA line is falling, it indicates a bearish trend.
  • Trend Direction Indication: Users can enable a color-coded visual aid where the line changes color based on its slope. Green signifies an uptrend, red signifies a downtrend, and blue indicates potential congestion or a flat slope.
  • Bar Coloring: This feature applies the trend-based color logic directly to the price bars, allowing for a cleaner visual representation of market sentiment relative to the VMA.

Details

The Variable Moving Average was developed by Tushar S. Chande. Unlike a traditional EMA which uses a fixed smoothing constant, the VMA employs a volatility index to dynamically adjust the smoothing factor.

The calculation involves determining the directional movement (plus and minus) and smoothing these values to derive a Volatility Index (vI). This index scales the smoothing constant ($k$): when volatility increases, the indicator becomes more sensitive to price changes; when volatility decreases, the indicator slows down to filter out market noise. This adaptive nature aims to reduce the lag typically found in static moving averages while minimizing whipsaws in sideways markets.

Settings

  • VMA Length: Determines the lookback period used for the calculation of the volatility index and the base smoothing constant. Higher values result in a smoother, slower line, while lower values increase sensitivity.
  • Show Trend Direction: Toggles the color-coding of the VMA plot. When enabled, the line changes color based on whether the current value is higher or lower than the previous value.
  • Color bars based on Trend: When enabled, the candlesticks or bars on the chart will be colored to match the trend state of the VMA (Green for up, Red for down, Blue for neutral).

FAQ

What makes VMA different from a standard EMA? While a standard EMA uses a fixed multiplier, the VMA uses a dynamic multiplier based on market volatility, allowing it to speed up during strong trends and slow down during ranging markets.

Can I use the VMA for trade signals? Yes, traders often look for price crosses over the VMA or changes in the VMA slope color (if enabled) as potential entry or exit signals.

How do I access the Variable Moving Average? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.