Volatility Adjusted Moving Average - JD
Jun 19, 2019

The Volatility Adjusted Moving Average - JD indicator provides a dynamic moving average that adjusts its position based on historical price volatility relative to an exponential baseline, offering a more responsive trend-following tool.
Usage
The Usage section describes how the script can be used to identify trend direction and potential reversal zones. The VAMA functions as a central trend line that shifts closer to or further from price action depending on the intensity of recent market movements.
- Trend Identification: Traders can use the color-coded VAMA line to determine market bias. A green line typically indicates an uptrend or price staying above the average, while a red line indicates a downtrend or price staying below the average.
- Volatility Bands: When the ATR feature is enabled, the script plots bands around the VAMA. These acts as dynamic support and resistance levels or volatility-adjusted target zones.
- Multi-Timeframe Analysis: By enabling the secondary VAMA, users can view a longer-term trend baseline alongside the primary one. This helps in identifying trend alignment across different horizons; for example, a "Fast" VAMA crossing a "Slow" VAMA can signal a significant shift in momentum.
- Smoothing: The indicator allows for optional smoothing (SMA, EMA, or WMA) to reduce noise in high-volatility environments, making the trend line easier to interpret.
Details
The Volatility Adjusted Moving Average is calculated through a multi-step process that differentiates it from standard moving averages. It begins with an Exponential Moving Average (EMA) as a base anchor. The script then calculates the deviation of the source price from this EMA over a specified lookback period.
By finding the highest and lowest deviations within the "Volatility Lookback Length," the script determines a volatility offset. This offset is averaged and added to the base EMA. The result is a moving average that "breathes" with the market: it expands when volatility increases and contracts during periods of consolidation. The refactored version also includes an ATR-based envelope system to provide a visual range of expected price movement.
Settings
- Base MA lookback length: Sets the period for the underlying EMA anchor used in the VAMA calculation.
- Volatility lookback length: Defines the window used to calculate the highest and lowest price deviations.
- Add longer TimeFrame MA: Toggles the visibility of a secondary, slower VAMA line on the chart.
- Timeframe Multiplier: Determines the lookback length of the slow VAMA relative to the fast one (e.g., a multiplier of 3 triples the lengths).
- Source: Specifies the price data used for calculations (default is Close).
- Smooth VAMA?: Enables or disables an additional smoothing layer on the final VAMA output.
- Smoothing MA type: Selects the method used for smoothing (SMA, EMA, or WMA).
- Smoothing length: Sets the period for the smoothing moving average.
- Show +/- ATR?: Toggles the visibility of the volatility-based bands around the VAMA.
- ATR length: Determines the period used for the Average True Range band calculation.
- Color bars?: Changes the chart bar colors to match the current VAMA trend state.
FAQ
How do I interpret the VAMA color changes? The color changes indicate the relationship between price and the average, as well as the slope of the average. Generally, green signifies bullish momentum and red signifies bearish momentum.
What is the benefit of volatility adjustment? Standard moving averages often suffer from lag or provide false signals during high volatility. The volatility adjustment helps the average react more intelligently to price swings, staying closer to price when it moves aggressively and smoothing out during flat periods.
How can I access the Volatility Adjusted Moving Average - JD? 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.