Turtle Soup Reversal Map [AGPro Series]Turtle Soup Reversal Map
🔹 Overview
Turtle Soup Reversal Map is a mean-reversion pattern detector inspired by Linda Raschke's classic "Turtle Soup" setup — a counter-attack on failed 20-bar breakouts. When price pierces a multi-bar extreme and then closes back inside the prior range, institutional traders often interpret it as trapped breakout participants being flushed. This script automates the detection, qualifies each setup with a transparent 0–100 score, and projects a reference target alongside an auto-resolving rejection zone. It is designed for traders who want a disciplined, rule-based way to spot failed breakouts without drawing them manually.
🔹 Unique Edge
Unlike generic liquidity-sweep or wick-rejection indicators, Turtle Soup Reversal Map is built around Raschke's specific 20-bar-extreme rule — a pattern with decades of documented performance in swing-trading literature. Three characteristics separate it from similar tools:
• Strict N-bar-extreme definition (not a simple swing-high/low fade). Price must violate the exact prior-lookback extreme, not just a minor pivot.
• Five-component adaptive quality score — wick rejection, volume spike, overshoot magnitude, higher-timeframe trend alignment, and key-level proximity. Each component is a transparent weighted contribution, with clear A+ / A / B / C grades.
• Full lifecycle state engine — Pending → Fired → Target/Stop/Invalidated. Setups that do not confirm within their window are auto-invalidated (not left hanging), and live win-rate plus average R-multiple are tracked over the most recent resolved setups.
🔹 Methodology
The script continuously monitors for price piercing the highest high or lowest low of the prior N bars (default 20, range 10–50). When a sweep occurs, a Pending setup is created. Confirmation is then evaluated in one of two user-selectable modes:
• Same-Bar Close — the violating bar must close back inside the prior range on the same bar (faster, more signals).
• Next-Bar Close — Raschke's original specification; the next bar must close back inside the prior range (slower, higher reliability).
If confirmation fires, the setup becomes Fired and a reference target is projected from the confirmation close (default 2.5 × ATR(14)). Stop is placed at the sweep extreme plus a configurable ATR buffer. Setups that fail to confirm within their window, or where price overshoots the stop before confirmation, are automatically invalidated.
The quality score blends: wick-to-range ratio at the extreme bar, relative volume spike versus its 20-bar average, overshoot magnitude (ATR-normalized with a sweet-spot curve), counter-trend alignment against a user-defined higher timeframe, and proximity to round numbers or recent pivot levels.
🔹 Signals & Alerts
The script produces three alert types, all configurable:
• Pending — sweep detected, awaiting confirmation.
• Fired — confirmation closed back inside prior range.
• Invalidated — setup dismissed due to overshoot or window timeout.
Each alert message includes direction (Bull/Bear), current grade, ticker, and timeframe. Fired setups are visualized with a labeled confirmation marker, a dashed target-projection line, a dotted stop-reference line, and an auto-closing rejection zone. Labels display the Soup-Bull / Soup-Bear name, grade, and numeric score.
🔹 Key Inputs
• Lookback Bars — size of the extreme window (default 20, range 10–50).
• Confirmation Mode — Same-Bar Close or Next-Bar Close.
• Invalidation Distance (ATR) — stop buffer beyond the sweep extreme (default 0.5).
• Target Projection (ATR) — reference reversal target distance from entry (default 2.5).
• Quality Score Components — each of the five score components can be toggled independently for custom configurations.
• HTF for Trend — higher timeframe used for the trend-alignment component (default 240 min).
• Stats Sample Size — rolling window of resolved setups used for win-rate and average reward metrics (default 30).
• Visual & Panel Options — zones, lines, labels, target projection, panel location, font sizes, and per-element toggles.
🔹 How to Use
1. Apply to any liquid instrument and timeframe. The pattern's rule set is symbol-agnostic but performs differently across assets — review the live Win Rate and Avg Reward metrics in the panel to calibrate expectations.
2. Watch the Status field in the panel. Idle means no active setup; Pending Bull/Bear means a sweep has occurred and the script is waiting for confirmation; Fired Bull/Bear means confirmation closed and a target has been projected.
3. Filter setups by grade. A+ and A setups have stronger confluence — particularly wick rejection, volume, and HTF alignment. B setups are acceptable under favorable market regimes; C grades are educational only.
4. Treat the target projection as a reference, not a trade instruction. The stop reference line marks where the structural invalidation lies. Always combine with your own risk management.
5. The historical Win Rate is computed over the last N resolved setups on the current chart; it reflects the pattern's fit with the current symbol and timeframe, not a guarantee.
🔹 Limitations & Transparency
This indicator identifies historical setups algorithmically. It does not predict future price movement, and no indicator does. Turtle Soup is a counter-trend mean-reversion pattern — in strong trending regimes, false signals increase; in consolidation and range-bound conditions, it performs best. The displayed Win Rate and Avg Reward are historical, rolling, chart-dependent, and should not be interpreted as future expectations. Target and stop references are geometric projections based on ATR, not optimized parameters.
🔹 Risk Disclosure
This script is a technical analysis tool for educational and research purposes. It is not a trading strategy, not a recommendation, and not financial advice. Past performance does not guarantee future results. Always conduct your own analysis and use proper risk management. Trade at your own risk.
Indicador Pine Script®









