OPEN-SOURCE SCRIPT
Dynamic Range Deviation & Volatility Exhaustion

The Dynamic Range Deviation indicator is a high-visibility technical analysis tool designed to identify periods of extreme market expansion and potential exhaustion. Using a Standard Deviation-based framework, it highlights candles that move significantly beyond the established mean, signaling "Overbought" or "Oversold" conditions through color-coded vertical overlays.
How It Works
The script calculates a central Basis line (Mean) and applies a Standard Deviation Multiplier to create a dynamic range.
Calculation: It measures the current price against its historical volatility over a user-defined lookback period.
Red Columns: Triggered when the price closes above the upper deviation band. This indicates a bullish extension where the price is statistically "expensive," often preceding a pullback or consolidation.
Blue Columns: Triggered when the price closes below the lower deviation band. This indicates a bearish extension where the price is statistically "cheap," often signaling a potential bounce or reversal.
Key Features
Modern UI: High-contrast, transparent overlays with distinct vertical borders for easy candle counting and trend duration analysis.
Adaptive Settings: Fully customizable lookback periods and multipliers to fit both Scalping (1m-15m) and Swing Trading (4h-1W) styles.
Clarity: Includes a "Range Fill" to help traders visualize the "Value Area" vs. the "Deviation Zones."
How It Works
The script calculates a central Basis line (Mean) and applies a Standard Deviation Multiplier to create a dynamic range.
Calculation: It measures the current price against its historical volatility over a user-defined lookback period.
Red Columns: Triggered when the price closes above the upper deviation band. This indicates a bullish extension where the price is statistically "expensive," often preceding a pullback or consolidation.
Blue Columns: Triggered when the price closes below the lower deviation band. This indicates a bearish extension where the price is statistically "cheap," often signaling a potential bounce or reversal.
Key Features
Modern UI: High-contrast, transparent overlays with distinct vertical borders for easy candle counting and trend duration analysis.
Adaptive Settings: Fully customizable lookback periods and multipliers to fit both Scalping (1m-15m) and Swing Trading (4h-1W) styles.
Clarity: Includes a "Range Fill" to help traders visualize the "Value Area" vs. the "Deviation Zones."
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.