Squeeze Breakout Pro [WillyAlgoTrader]Squeeze Breakout Pro (SBP) is an overlay indicator that detects volatility compression zones where Bollinger Bands contract inside a Keltner Channel, waits for a confirmed directional breakout with volume and momentum validation, and then maps a complete trade framework: structural stop loss at the opposite side of the range, and three take-profit targets calculated as R-multiples of the range width using Fibonacci-based extensions. A built-in dashboard tracks TP hit rates across the chart's history so you can evaluate the setup's statistical behavior on any instrument and timeframe.
The concept of a "squeeze" — Bollinger Bands narrowing inside Keltner Channels — has been around for decades. What SBP adds is a structured decision pipeline: it doesn't just flag the squeeze, it qualifies it with ADX to confirm a genuine range-bound condition, requires volume confirmation on the breakout bar, defines exact entry/SL/TP levels, and tracks how often each target is reached — turning a raw volatility observation into a repeatable trade setup with measurable outcomes.
🔍 WHAT MAKES IT ORIGINAL
1. Squeeze qualification via ADX filter. A standard BB-inside-KC squeeze fires frequently and includes many false compressions during trending pullbacks. SBP adds an ADX filter that requires the Average Directional Index to be below a user-defined threshold (default 21) during the squeeze phase. This ensures the consolidation is a genuine range-bound condition — not a brief pause in a strong trend that would produce a low-quality breakout. The combination of BB/KC compression + low ADX produces significantly fewer but higher-quality squeeze zones.
2. Minimum squeeze duration requirement. Not every momentary BB/KC overlap deserves attention. SBP requires a configurable minimum number of consecutive squeeze bars (default 5) before the range is considered valid. Short, fleeting compressions are ignored. This filters out the noise that plagues most squeeze indicators on lower timeframes.
3. Structural stop loss with ATR padding. Instead of a fixed-pip or fixed-percentage stop, SBP places the stop loss at the opposite boundary of the detected consolidation range — the natural structural level — plus a configurable ATR-based padding (default 20% of ATR). For a bullish breakout, SL sits below the range low; for bearish, above the range high. This gives the stop a structural reason to exist, tied to the actual price action that formed the squeeze.
4. R-multiple targets using Fibonacci extensions. Take-profit levels are calculated as multiples of the range width projected from the entry price:
— TP1 at 0.618× range width (conservative, first scale-out)
— TP2 at 1.0× range width (full range projection)
— TP3 at 1.618× range width (golden ratio extension)
All three multipliers are fully configurable. The range width serves as the natural "R" unit because it represents the energy stored during compression — wider ranges store more energy and project further.
5. Built-in TP/SL hit-rate tracking. The dashboard counts every breakout signal on the visible chart and tracks how many times each TP level was reached versus how many times the SL was hit. This gives you an instant statistical profile of the setup's behavior on the current instrument and timeframe — no external backtesting tool required. The hit rates update in real time as new signals form.
6. Overlap prevention. An optional toggle (on by default) prevents a new squeeze zone from forming if it would overlap with the previous one, avoiding redundant signals in choppy markets where squeezes cluster.
⚙️ HOW IT WORKS
Step 1 — Squeeze detection:
On each bar, the script calculates Bollinger Bands (SMA ± StdDev × multiplier) and a Keltner Channel (SMA ± ATR × multiplier) using the same base length. When both BB boundaries sit inside both KC boundaries (upper BB < upper KC AND lower BB > lower KC), the market is in a squeeze. If the ADX filter is enabled, the squeeze is only valid when ADX is also below the threshold — confirming low directional momentum.
Step 2 — Range construction:
While the squeeze is active, the script tracks the highest high and lowest low across all squeeze bars, building a dynamic range box. When the squeeze condition ends (BB expands beyond KC or ADX rises), the range is locked — but only if the squeeze lasted at least the minimum required bars. The locked range defines the consolidation zone for breakout detection.
Step 3 — Breakout confirmation:
After the range is locked, the script watches for a confirmed bar close above the range high (bullish breakout) or below the range low (bearish breakout). If volume confirmation is enabled, the breakout bar must also have volume exceeding the SMA(volume) × the configured multiplier. All breakout signals require barstate.isconfirmed — they trigger only on bar close and do not repaint.
Step 4 — Trade framework:
On breakout, the script calculates and plots:
— Entry: the breakout bar's close price
— SL: opposite range boundary ± ATR padding
— TP1 / TP2 / TP3: entry ± (range width × configured multipliers)
These levels extend forward as horizontal lines with a risk/reward fill zone until a target or stop is hit. When TP3 or SL is reached (bar close), the trade is closed and levels stop extending.
Step 5 — Hit tracking:
Each TP level and the SL are monitored on every confirmed bar after entry. When price touches (via high/low) a TP level, it is marked as hit. If SL is hit before TP3, the trade closes at a loss. The dashboard aggregates these outcomes across all signals on the chart.
Volume on forex:
On instruments without volume data (common on forex), the volume filter is automatically bypassed — so the indicator works seamlessly across asset classes without manual adjustment.
📖 HOW TO USE
Reading the chart:
— Yellow-tinted boxes = detected squeeze zones (consolidation ranges)
— "Long" label below bar = confirmed bullish breakout
— "Short" label above bar = confirmed bearish breakout
— Green line = entry level
— Red dashed line = stop loss
— Dotted/solid green lines = TP1 / TP2 / TP3
— Green-tinted fill between entry and TP3 = reward zone
— Red-tinted fill between entry and SL = risk zone
Suggested workflow:
— Wait for a squeeze zone to form and lock (box appears, disappears when squeeze ends)
— Dashboard shows "Pending" when a valid range is ready for breakout
— On breakout, evaluate the signal: check TP/SL levels, assess the range width, and decide position size based on the distance to SL
— Use TP1 for conservative partial exit, TP2 for second scale-out, TP3 for runner
— Review the TP1/TP3 hit rates in the dashboard to calibrate your expectations for the current instrument
Timeframe guidance:
— Scalping (1–5min): Squeeze Length 10–15, Min Squeeze Bars 3–5, ADX threshold 25
— Intraday (15min–1H): Squeeze Length 15–20, Min Squeeze Bars 5–8, default settings
— Swing (4H–Daily): Squeeze Length 20–30, Min Squeeze Bars 8–15, ADX threshold 18–20
— The longer the squeeze and higher the timeframe, the more energy stored → larger projected targets
⚙️ KEY SETTINGS REFERENCE
— Squeeze Length (default 13): shared period for BB and KC — higher = detects longer consolidations
— BB Multiplier (default 2.0): Bollinger Bands standard deviation multiplier
— KC Multiplier (default 1.2): Keltner Channel ATR multiplier — the gap between BB and KC multipliers controls how easily a squeeze triggers
— ADX Filter (default On): require low directional movement during squeeze
— ADX Threshold (default 21): maximum ADX value for valid squeeze — lower = stricter
— Volume Confirmation (default On): require volume spike on breakout bar (auto-disabled on forex)
— Volume Spike Mult (default 1.3): breakout volume must exceed SMA × this multiplier
— Min Squeeze Bars (default 5): minimum consecutive squeeze bars for valid range
— Prevent Overlap (default On): no new squeeze zone if it overlaps the previous one
— TP1 / TP2 / TP3 (default 0.618 / 1.0 / 1.618): take-profit as R-multiples of range width
— SL Padding (default 0.2): extra padding beyond range boundary, as fraction of ATR
📊 Dashboard
The info panel (adjustable to any chart corner) displays:
— Current squeeze status (Active with bar count, or None)
— Trade direction (Long / Short / —)
— Signal state (Active / Pending / Wait)
— ADX value with color coding (green if below threshold, red if above)
— Total breakout count (Long / Short split)
— TP1 and TP3 hit rates as percentages across all signals on chart
— Current timeframe and indicator version
⚠️ IMPORTANT NOTES
— This indicator does not repaint. All breakout signals require bar-close confirmation (barstate.isconfirmed).
— The TP hit rates shown in the dashboard are historical statistics on the current chart , not predictions. They depend entirely on the instrument, timeframe, and date range visible. A 70% TP1 hit rate on past data does not guarantee 70% going forward.
— SBP provides a structured trade framework (entry/SL/TP), but it is not a complete trading system . Position sizing, risk management, and trade selection remain the trader's responsibility.
— Not every squeeze produces a clean breakout. Some ranges resolve with choppy, directionless price action. The ADX filter and volume confirmation reduce this, but cannot eliminate it entirely.
— The indicator works across all asset classes — stocks, crypto, forex, futures, commodities. Volume features auto-adapt to instruments without volume data.
Indicateur Pine Script®






















