Dynamic Volume Adaptive Moving Average (MZ DVAMA)
Dec 28, 2021

The Dynamic Volume Adaptive Moving Average (MZ DVAMA) indicator provides a volume-filtered moving average designed to adapt to market trends with higher precision than standard adaptive moving averages. By integrating volume oscillator data into the length calculation, it distinguishes between market momentum, consolidation, and breakouts, adjusting its color and slope dynamically to reflect trend health.
Usage
The Usage section describes how the script can be used to interpret market conditions through visual cues and signal generation.
- Trend Health Identification: The indicator uses a multi-color scheme to define current market states:
- Dark Green: Indicates a strong uptrend supported by high volume.
- Light Green (Lime): Suggests a weaker uptrend or waning momentum.
- Dark Red: Indicates a strong downtrend with volume support.
- Gray/Secondary Color: Suggests a weakening downtrend.
- Neutral (Blue/Yellow): Represents a choppy or consolidating market where taking new positions may carry higher risk.
- Dynamic Envelopes: The script includes an optional envelope system that calculates distance based on ATR. These bands help identify overextended price action (top/bottom warnings) and potential mean reversion zones.
- Signals: If enabled, the indicator plots buy and sell signals based on crossovers and volume breakthroughs. Entering on "absolute alerts" when volume breaks key thresholds is a common strategy for momentum trading.
Details
The MZ DVAMA is inspired by Vitali Apirine's work on Adaptive Moving Averages but adds a proprietary volume filtering layer. Unlike traditional AMAs that only look at price volatility, this version uses a "Dynamic Length" variable controlled by a Volume Oscillator (with multiple selectable types like VZO, KVO, or OBV).
The indicator calculates a Relative Volume Strength Index (RVSI) using a Hull Moving Average (HMA). This RVSI determines whether the "Slow Length" of the moving average should contract or expand. When volume breaks above a specific threshold, the moving average adapts its smoothing factor to track the price more closely, reducing the lag often found in standard moving averages during high-momentum breakouts.
Settings
Source Parameters
- Different Sources Options: Selects the price data used for calculations (e.g., Weighted, Heikin Ashi, or traditional sources).
- Source Setup: The primary price input (Close, HL2, etc.).
- Apply Symmetrically Weighted Moving Average: Applies a smoothing filter to the price source to reduce noise (Note: may cause slight recalculation).
DVAMA Parameters
- Length: The main lookback period for the moving average calculation.
- Fast Length: The minimum period for the adaptive smoothing.
- Slow Min/Max Length: The range within which the moving average length can dynamically adjust based on volume.
- Adapting Percentage: Determines how aggressively the length changes in response to volume fluctuations.
MZ RVSI & Oscillator Parameters
- Volume Oscillator Type: Choose between TFS, OBV, Klinger, Cumulative, or Volume Zone Oscillators.
- RVSI Period: The period used to calculate the volume-based strength index.
- RVSI Break point: The threshold that determines when the MA should switch to "active" volume adaptation.
Slope & Envelope Parameters
- Slope Period: The lookback used to determine the angle/slope of the DVAMA.
- Consolidation area slope: The threshold below which the trend is considered "flat" or sideways.
- Distance (Envelope) Multiplier: Adjusts the width of the ATR-based bands.
FAQ
How do I interpret the different colors of the moving average? The colors represent a combination of price slope and volume support. Solid greens and reds represent high-conviction trends, while lighter colors or neutrals suggest consolidation or weakening momentum.
Which Volume Oscillator type should I use? The "TFS Volume Oscillator" is the default for general trend following. For traders focused on money flow, "On Balance Volume" (OBV) or "Volume Zone Oscillator" (VZO) may provide better insights into accumulation and distribution.
How can I access this indicator? 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.