Adaptive Regime Filter + Divergence (AER-VN)
Apr 4, 2026

The Adaptive Regime Filter + Divergence (AER-VN) indicator provides professional-grade market regime classification combined with advanced divergence detection to identify trend quality and potential reversals.
Usage
The Usage section describes how the script can be used to interpret market conditions and identify trading opportunities. The indicator classifies market behavior into four distinct regimes, visually represented by the color of the oscillator line and optionally the price bars:
- Uptrend (Teal): High-quality upward movement where efficiency exceeds the dynamic threshold.
- Downtrend (Maroon): Sustained selling pressure where efficiency exceeds the dynamic threshold.
- Choppiness (Orange): Low efficiency during high volatility, indicating noisy and directionless price action.
- Consolidation (Gray): Low efficiency during low volatility, representing quiet, range-bound markets.
Traders can also utilize the integrated divergence system to spot momentum exhaustion or trend continuation:
- Regular Divergences (Red/Lime Circles): Indicate potential trend reversals when price and efficiency move in opposite directions at swing points.
- Hidden Divergences (Orange/Aqua Circles): Suggest trend continuation after a pullback or retracement.
Details
The AER-VN methodology is an evolution of Kaufman's Efficiency Ratio (ER). While traditional ER indicators use static thresholds, this tool introduces a Volatility Normalization Engine. This engine compares the current Average True Range (ATR) against a historical baseline to create an ATR Ratio.
This ratio dynamically adjusts the efficiency threshold required to classify a market as "trending." In high-volatility environments, the threshold rises to filter out "volatile chop," while in low-volatility environments, it contracts to capture subtle emerging trends. The divergence detection logic uses confirmed swing points to ensure that signal markers do not repaint once the subsequent bar confirms the pivot.
Settings
Efficiency Ratio Settings
- ER Lookback (N): The period used to calculate the ratio of price displacement to total path distance.
- Base ER Threshold: The foundational efficiency level required for a trend classification under normal volatility.
- Max Threshold Cap: A safety ceiling that prevents the dynamic threshold from reaching mathematically impossible levels during extreme volatility.
Volatility Normalization
- ATR Length: The lookback period for the current Average True Range calculation.
- ATR Mean Lookback: The historical window used to establish the volatility baseline for scaling.
Divergence Settings
- Swing Definition Length: The window used to identify pivot highs and lows. Larger values detect major swings, while smaller values detect micro-structure.
- Visual Toggles: Options to enable or disable markers and connecting lines for Regular and Hidden divergences.
FAQ
How do I interpret the dynamic threshold?
The white crossed line on the indicator represents the current volatility-adjusted requirement. When the colored Efficiency Ratio line is above this threshold, the market is considered to be in a trending regime.
What is the difference between Regular and Hidden divergences?
Regular divergences typically signal a potential trend reversal, whereas Hidden divergences act as a signal that the prevailing trend is likely to continue after a temporary counter-trend move.
How can I access Adaptive Regime Filter + Divergence (AER-VN)?
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.