Reversal Detection System v3.5

Reversal Detection System (RDS) v3.5 is a comprehensive, non-repainting market structure analysis indicator that combines eleven complementary analysis modules and a built-in trade management system into a single overlay. It identifies reversals, structure breaks, institutional order flow, and trend quality using adaptive ATR-based sensitivity with five preset levels plus a fully customizable mode.
WHAT IT DOES
RDS integrates the following analysis and trade management components:
•Adaptive Zigzag Reversal Detection — Identifies confirmed price reversals using ATR-scaled sensitivity with adjustable confirmation bars to eliminate repainting. Labels display exact reversal price, time, and directional arrows.
•Built-in Trade Management (Entry/SL/TP) — When a confirmed reversal signal fires, the system automatically plots Entry, Stop Loss, and three Take Profit levels. Entry is set at the signal bar close, SL is placed beyond the reversal pivot with an ATR-based buffer, and TP1/TP2/TP3 are calculated at configurable ATR multiples. Fixed-length lines extend a user-defined number of bars with price labels at the right end. Lines auto-clear when SL or TP3 is hit, or when a new signal fires.
•Smart Money Concepts (BOS/CHoCH) — Detects Break of Structure (trend continuation) and Change of Character (trend reversal) using fractal-based swing point analysis. Optional momentum Z-score filter ensures signals fire only during genuine directional moves, reducing noise in ranging markets.
•Pivot Structure Breaks (PSB) — Independent structure break detection using standard pivot high/low analysis with a required momentum Z-score gate. Distinct from BOS/CHoCH to provide dual-confirmation opportunities.
•Volumetric Order Blocks — Identifies institutional order blocks with buy/sell volume distribution. Displays proportional boxes showing volume split at each order block with percentage labels, separator lines, and optional midlines.
•Fair Value Gaps (FVG) — Detects three-bar imbalance zones with configurable minimum size filtering, real-time fill-percentage tracking, equilibrium midlines, and automatic mitigation cleanup. Includes an overlap tolerance setting for liquid futures markets where true gaps are rare, ensuring FVGs are detected even on instruments like MNQ and MES.
•Mobius Trend Pivots — Visual supply/demand zone identification based on higher-high/lower-low trend sequences. Draws dynamic zone boxes with rollover threshold lines for discretionary reference.
•Premium/Discount Zones — Calculates swing range and displays premium, equilibrium, and discount zones with volume-based strength percentages at swing high/low boundaries.
•Supply/Demand Zones — Plots rectangular supply and demand zones at confirmed reversal pivots with configurable thickness, extension, and label sizing.
•Strong/Weak HH/HL/LH/LL Detection — Measures pivot significance in ATR multiples and labels higher highs, lower lows, lower highs, and higher lows with individual toggle controls.
•Short Trend Dashboard — Scores five real-time components (momentum, candle strength, micro trend, acceleration, volume buy/sell pressure) to produce a 0-100 quality score, letter grade, and heat gauge temperature reading. Available in vertical or horizontal compact layout with scalable sizing from Tiny to Huge.
HOW IT WORKS
The reversal engine uses a dual-method approach: an ATR-scaled adaptive threshold determines the minimum price movement required to confirm a directional change, with five sensitivity presets mapping to specific ATR multipliers (0.8 to 3.5) and percentage thresholds (0.02% to 0.08%). The zigzag algorithm tracks running highs and lows, confirming a reversal only when the counter-movement exceeds the calculated threshold. An optional confirmation-bar delay provides additional repainting protection.
When a reversal is confirmed, the trade management module activates. For a bullish reversal, it sets entry at the signal bar close, places the stop loss below the confirmed pivot low with a configurable ATR buffer, and calculates three take-profit targets at user-defined ATR multiples above entry. The inverse applies to bearish reversals. Lines are drawn for a fixed number of bars (default 20, configurable 5-100) with labeled price tags at the right end. Each new signal clears the previous trade setup, and lines auto-remove when either the stop loss or TP3 is reached.
Structure break detection operates through two independent systems. The BOS/CHoCH module uses fractal sums over a configurable period to identify swing highs and lows, then detects crossovers against the most recent unbroken fractal point. The PSB module uses standard pivot high/low functions with a separate lookback period and an always-on momentum Z-score requirement. Both systems can operate simultaneously for confluence analysis.
The momentum Z-score calculation compares the current bar's price change to the statistical mean and standard deviation of price changes over a configurable lookback period. Z-scores above the user-defined threshold gate BOS/CHoCH signals (when enabled) and are always required for PSB signals.
The Fair Value Gap module detects three-bar imbalance zones where the current bar's low exceeds the high from two bars ago (bullish) or vice versa. An overlap tolerance parameter allows detection of near-gaps on liquid instruments where wicks typically overlap slightly. Mitigation tracks whether price has subsequently filled the gap from the correct side: bullish FVGs are mitigated when price falls through the bottom of the zone, bearish FVGs when price rises through the top.
The Short Trend Dashboard aggregates five directional votes: price momentum (ROC vs. ATR threshold), candle morphology (body ratio, rejection wicks), micro EMA trend (fast/slow EMA crossover normalized by ATR), momentum acceleration (current vs. previous bar velocity), and volume buy/sell pressure split. Each component scores 0-25 points with direction alignment. A consensus vote determines the overall direction, and component scores are normalized to a 0-100 quality rating with a letter grade. The Heat Gauge independently scores seven micro-indicators on a 0-100 scale mapped to temperature labels with gradient coloring. Dashboard sizing scales all text elements across five levels (Tiny through Huge) with a three-tier hierarchy for headlines, standard labels, and detail rows.
HOW TO USE IT
Apply to any symbol and timeframe. The indicator is optimized for intraday futures (MNQ, MES, MYM, MGC, MCL) on 1-15 minute charts but functions on all markets and timeframes.
•Quick Start: Enable the indicator with default settings (Sensitivity: High, Confirmed Only mode). Green upward-arrow labels mark bullish reversals with automatic long trade setups; red downward-arrow labels mark bearish reversals with short trade setups. Entry, SL, and TP1/TP2/TP3 lines appear automatically.
•Trade Management: Adjust the ATR-based TP/SL distances under the Trade Management input group. Default TP multipliers are 1.0/2.0/3.0 ATR with a 0.5 ATR stop loss buffer. Customize line colors, width, style, and extension length to match your chart preference.
•Structure Analysis: Enable BOS, CHoCH, and PSB for market structure context. BOS labels confirm trend continuation, CHoCH labels signal potential reversals, and PSB provides independent pivot-based confirmation.
•Institutional Flow: Enable Order Blocks and Fair Value Gaps to identify institutional entry zones. Order blocks show volume distribution; FVGs highlight imbalance zones with real-time fill tracking. For liquid futures, set FVG Overlap Tolerance to 0.2 or higher.
•Zone Analysis: Enable Premium/Discount Zones for swing range context and Mobius Trend Pivots for dynamic supply/demand reference zones.
•Trend Quality: The Short Trend Dashboard provides a real-time consensus reading. Use the quality score and letter grade to gauge trade conviction. Resize the dashboard from Tiny to Huge to fit your chart layout.
•Signal Confluence: STRONG Bullish/Bearish alerts fire only when a reversal signal coincides with the EMA trend system (8/13/20), providing a built-in confluence filter.
KEY SETTINGS
Setting Description
Sensitivity Preset Very High (most signals) through Very Low (fewest). Custom unlocks ATR multiplier, percentage, and absolute reversal controls.
Signal Mode Confirmed Only (non-repainting), Confirmed + Preview, or Preview Only.
TP/SL Multipliers ATR-based take profit (TP1/TP2/TP3) and stop loss buffer distances. Default: 1.0/2.0/3.0 ATR for TPs, 0.5 ATR for SL buffer.
Line Length (bars) How far TP/SL/Entry lines extend from signal bar. Default: 20 bars.
Fractal Length BOS/CHoCH detection period. Higher values = fewer, more significant structure breaks.
FVG Overlap Tolerance Allows near-gap detection on liquid markets. 0.2 ATR recommended for micro futures.
Dashboard Size Scales the Short Trend Dashboard from Tiny to Huge with proportional text hierarchy.
Scalper Mode Reduces all dashboard lookback periods for 1-5 minute timeframe responsiveness.
ALERTS
Nineteen alert conditions are available:
•Bullish/Bearish Reversal
•STRONG Bullish/Bearish Confluence (Reversal + EMA alignment)
•Bullish/Bearish BOS and CHoCH (individual and combined)
•Bullish/Bearish PSB (individual and combined)
•Bullish/Bearish FVG
•Strong HH, Strong LL, LH Detected, HL Detected
NOTES
•Non-repainting in Confirmed Only mode with 0 extra confirmation bars.
•All features are independently toggleable to reduce chart clutter.
•Trade management lines auto-clear on SL/TP3 hit or new signal.
•The Info Table displays current settings, direction, signal state, volume trend, and PSB status.
•Designed for overlay use alongside complementary oscillator-based tools.
•Pine Script v6 compatible. Protected source.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Skript nur auf Einladung
Ausschließlich Nutzer mit einer Erlaubnis des Autors können Zugriff auf dieses Script erhalten. Sie müssen diese Genehmigung bei dem Autor beantragen. Dies umfasst üblicherweise auch eine Zahlung. Wenn Sie mehr erfahren möchten, dann sehen Sie sich unten die Anweisungen des Autors an oder kontaktieren Sie NPR21 direkt.
TradingView empfiehlt NICHT, für die Nutzung eines Scripts zu bezahlen, wenn Sie den Autor nicht als vertrauenswürdig halten und verstehen, wie das Script funktioniert. Sie können außerdem auch kostenlose Open-Source-Alternativen in unseren Community-Scripts finden.
Hinweise des Autors
Haftungsausschluss
Skript nur auf Einladung
Ausschließlich Nutzer mit einer Erlaubnis des Autors können Zugriff auf dieses Script erhalten. Sie müssen diese Genehmigung bei dem Autor beantragen. Dies umfasst üblicherweise auch eine Zahlung. Wenn Sie mehr erfahren möchten, dann sehen Sie sich unten die Anweisungen des Autors an oder kontaktieren Sie NPR21 direkt.
TradingView empfiehlt NICHT, für die Nutzung eines Scripts zu bezahlen, wenn Sie den Autor nicht als vertrauenswürdig halten und verstehen, wie das Script funktioniert. Sie können außerdem auch kostenlose Open-Source-Alternativen in unseren Community-Scripts finden.