Variable Length Moving Average (VLMA)

Parameters: period = 14 (5–50) volatility_period = 9 (5–30)

Overview

The Variable Length Moving Average represents an evolution in moving average technology by incorporating adaptive behavior based on market volatility. First introduced in Technical Analysis of Stocks & Commodities magazine in March 1992, the VLMA uses a volatility index (often the Chande Momentum Oscillator or standard deviation) to adjust its effective length dynamically. When volatility increases, the average speeds up to capture trend changes quickly; when volatility decreases, it slows down to filter out market noise.

The calculation follows the formula VMA = α × VI × Close + (1 - α × VI) × Previous VMA, where VI is the volatility index and α is the smoothing constant (2/(N+1)). This approach allows the indicator to automatically adjust its sensitivity without manual intervention, making it particularly effective in markets that alternate between trending and ranging phases. The result is a moving average that remains responsive to genuine price movements while avoiding excessive whipsaws during consolidation periods.

Interpretation & Trading Signals

Price Crossover Signals:

  • Bullish Signal: Price crosses above VLMA - potential long entry
  • Bearish Signal: Price crosses below VLMA - potential short entry
  • Adaptive Response: Faster signals in volatile markets, fewer whipsaws in quiet markets
  • Confirmation: Strong trends show clear separation from VLMA

Trend Analysis:

  • Dynamic Support: VLMA acts as support in uptrends when volatility is low
  • Dynamic Resistance: VLMA provides resistance in downtrends
  • Trend Strength: Steeper VLMA slope indicates stronger trend momentum
  • Volatility Adaptation: VLMA automatically adjusts to market conditions

Multiple VLMA Strategy:

  • Dual VLMA: Use fast and slow VLMA for crossover signals
  • VLMA + Traditional MA: Combine with SMA/EMA for confirmation
  • Volatility Filters: Trade only when volatility index confirms trend
  • Risk Management: Use VLMA as trailing stop in trending markets

Example Usage

Code examples will be available once the Rust implementation is complete.

Performance Analysis

Related Indicators