OPEN-SOURCE SCRIPT

Radiant Mean Reversion Channels [Pineify]

172
Radiant Mean Reversion Channels - HMA & ATR Normalized Oscillator with Dynamic Gradient Signals

The Radiant Mean Reversion Channels indicator is a volatility-normalized oscillator designed to detect high-probability mean reversion setups across any market and timeframe. It transforms a Hull Moving Average (HMA) based channel into a bounded 0–100 oscillator, making it easy to spot when price has stretched to statistical extremes and is likely to revert toward equilibrium. By combining the low-lag properties of HMA with the adaptive volatility measurement of ATR, this indicator provides fast, accurate overbought and oversold readings without the noise common in traditional oscillators.

Key Features

  • HMA-based dynamic mean for ultra-low-lag price tracking

  • ATR-driven volatility bands that automatically adapt to market conditions

  • Normalized 0–100 oscillator scale for consistent interpretation across all instruments

  • WMA smoothing to reduce whipsaws while preserving signal responsiveness

  • Dynamic gradient coloring that shifts from bearish to bullish based on oscillator value

  • Clearly defined overbought (80/90) and oversold (10/20) zones with visual fills

  • Automatic buy and sell signal generation on mean reversion crossovers

  • Built-in alert conditions for seamless trading automation


How It Works

The indicator follows a five-step calculation pipeline that converts raw price action into a clean, actionable oscillator:

  1. Dynamic Mean via HMA: The center of the channel is calculated using a Hull Moving Average of the selected source over the specified channel length. HMA was chosen specifically because it dramatically reduces lag compared to SMA or EMA while maintaining a smooth curve, giving traders a more accurate real-time estimate of the current mean price.

  2. Volatility Measurement via ATR: The Average True Range over the same lookback period measures current market volatility. This value is scaled by a user-defined Band Multiplier to create the channel width. ATR naturally adapts—widening during volatile conditions and tightening during consolidation—ensuring the channel remains contextually appropriate.

  3. Channel Construction: The upper and lower bands are formed by adding and subtracting the scaled ATR from the HMA mean. This creates a dynamic envelope that contains most price action under normal conditions.

  4. Normalization to Oscillator: The price position within the channel is normalized using the formula: (Price - Lower Band) / (Upper Band - Lower Band) × 100. This maps the channel into a 0–100 scale where 0 represents the lower band, 100 represents the upper band, and 50 represents the mean. Values above 100 or below 0 indicate price has exceeded the channel boundaries.

  5. WMA Smoothing: The raw oscillator is smoothed using a Weighted Moving Average, which gives more weight to recent readings. This reduces noise and false signals while keeping the oscillator responsive to genuine shifts in momentum.


Trading Ideas and Insights

Mean reversion is a core principle in quantitative trading—prices tend to oscillate around a fair value and snap back after stretching too far. The Radiant Mean Reversion Channels quantifies this behavior by measuring exactly where price sits within its volatility envelope:

  • When the oscillator rises above 80, price is near the upper channel band—a statistically overbought condition where selling pressure often emerges

  • When the oscillator falls below 20, price is near the lower channel band—an oversold zone where buyers tend to step in

  • The extreme levels at 90 and 10 represent deeper extensions where reversion probability increases significantly

  • Signal generation occurs when the oscillator crosses back inside these zones, timing the actual beginning of the reversion move rather than trying to catch the exact top or bottom


This method excels in range-bound and mean-reverting markets. In trending markets, the signals can be used to identify pullback entry opportunities in the direction of the prevailing trend.

How Multiple Indicators Work Together

The Radiant Mean Reversion Channels integrates three distinct technical concepts into a cohesive analytical framework:

  1. Hull Moving Average (Mean): HMA serves as the dynamic center of the channel. Its unique double-smoothed, lag-compensated formula (using nested WMAs with square root period adjustment) provides a mean line that reacts to trend changes significantly faster than traditional averages. This ensures the "fair value" baseline stays current with evolving market conditions.

  2. Average True Range (Volatility): ATR measures real market volatility by accounting for gaps and true trading ranges—not just close-to-close changes. As the volatility component, ATR automatically adjusts the channel width. During high-volatility periods, the channel expands so that only truly extreme moves trigger signals. During low-volatility periods, it contracts to remain sensitive, preventing missed opportunities.

  3. Weighted Moving Average (Smoothing): The WMA applied to the normalized oscillator gives heavier weight to the most recent data points. This produces a smoother output than SMA while introducing less lag than EMA for short smoothing periods, striking an optimal balance between signal clarity and timeliness.


These three components work together synergistically: HMA tracks where price should be, ATR defines how far is too far, and WMA ensures the final oscillator reading is clean and reliable.

Unique Aspects

  • HMA-ATR Combination: Most channel-based oscillators use Bollinger Bands (SMA + Standard Deviation). By pairing HMA with ATR, this indicator benefits from lower lag on the mean and a volatility measure that accounts for gaps and true range—producing faster and more robust channel boundaries

  • Dynamic Gradient Visualization: The oscillator line smoothly transitions color from bearish to bullish across the 0–100 range using a continuous gradient. This provides immediate visual feedback on market conditions without requiring traders to reference fixed levels

  • Dual-Zone Architecture: The indicator features both standard zones (20/80) and extreme zones (10/90) with distinct visual fills, helping traders differentiate between moderate and extreme conditions at a glance

  • Normalization Advantage: By converting the channel into a normalized oscillator, traders can compare readings across different assets and timeframes on a consistent scale, making it versatile for multi-market analysis


How to Use

  1. Add the indicator to your chart—it displays as a sub-chart oscillator below the main price chart

  2. Monitor the oscillator's position: readings above 80 indicate overbought conditions, below 20 indicate oversold conditions

  3. Watch for buy signals (circles at the bottom) when the oscillator crosses back above 20 from oversold territory, indicating a bullish mean reversion is underway

  4. Watch for sell signals (circles at the top) when the oscillator crosses back below 80 from overbought territory, signaling a bearish mean reversion

  5. Use the gradient color intensity to quickly assess momentum—greener tones indicate bullish positioning while redder tones indicate bearish positioning

  6. Combine with trend analysis: in uptrends, prioritize buy signals near the 20 level; in downtrends, prioritize sell signals near the 80 level

  7. Enable alerts using the built-in alert conditions to receive notifications when reversion signals trigger


Customization

  • Channel Length (default: 21): Controls the lookback period for both the HMA mean and ATR volatility calculation. Shorter values increase sensitivity for scalping; longer values provide smoother readings for swing trading

  • Band Multiplier (default: 2.0): Adjusts the channel width by scaling the ATR value. Higher values create wider channels, producing fewer but higher-confidence signals. Lower values narrow the channel for more frequent signals

  • Oscillator Smoothing (default: 3): Controls the WMA smoothing period applied to the raw oscillator. Increase this value in choppy markets to filter out noise; decrease it in clean-trending markets for faster signals

  • Source (default: Close): Select the price source for all calculations. Alternatives like HL2 or HLC3 can provide smoother inputs

  • Bullish/Bearish/Neutral Colors: Fully customizable color scheme for the gradient, zones, and signal markers to match your preferred chart theme


Conclusion

The Radiant Mean Reversion Channels indicator offers traders a refined approach to mean reversion analysis by combining the speed of Hull Moving Average, the adaptive volatility measurement of ATR, and intelligent WMA smoothing into a single normalized oscillator. Its gradient visualization, clearly defined reversion zones, and automated signal generation make it a practical and visually intuitive tool for identifying high-probability reversal points. Whether used for timing entries in range-bound markets or catching pullbacks in trending conditions, this indicator brings clarity and precision to mean reversion trading strategies.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.