מעודכן

Smart Breakout PRO [EXCAVO]

3 404
Quality-Graded Consolidation Breakouts with a Real Entry Anchor

The Smart Breakout PRO detects price consolidation (squeeze) phases using range-to-ATR compression analysis, then flags directional breakouts with a weighted quality grading system. Each breakout receives an A/B/C grade from volume surge, candle momentum, and lower-timeframe delta alignment. The broken consolidation range is drawn as a box and the entry is anchored at the breakout close - the first price you can actually act on.

This is not a basic breakout detector. The quality grading pipeline and the dual squeeze gate (relative compression plus an absolute width cap) keep the focus on structurally sound breakouts out of genuinely tight ranges.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE

Step 1 → Add the indicator. The squeeze engine scans for consolidation
phases. A dashed box outlines the range while it is compressed.
Step 2 → Watch for the breakout marker - a colored bubble (blue up /
red down) showing the direction and the A/B/C quality grade in
one label. It prints when price closes beyond the range with
sufficient impulse and volume.
Step 3 → Read the entry tag. An orange label at the breakout close shows
the exact entry price - the real, actionable level. The broken
range stays behind it as a box with a highlighted breakout edge and
a caption showing how long it consolidated and how tight it was.
Step 4 → Check the dashboard for current status, last breakout, ATR
regime, and squeeze state.
Step 5 → Use the HTF trend filter (off by default) to keep only breakouts
aligned with the higher timeframe direction.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES

◆ Squeeze Detection (relative compression + absolute width cap)
The engine computes the ratio of the N-bar price range to the 14-period ATR:
range_ratio = (highest(high, N) - lowest(low, N)) / ATR(14). Two conditions must
both hold for a squeeze: (1) the ratio is ranked against its own last 100 bars
and sits at or below the squeeze percentile (default 30), and (2) the ratio is
within an absolute width cap (Max Range, default 4x ATR). The percentile makes
detection self-adjusting across instruments and timeframes; the width cap keeps
a wide range in a high-volatility regime from being treated as a tight squeeze.
A squeeze becomes valid after persisting a minimum number of consecutive bars
(default 5). The high and low of the squeeze period define the consolidation range.

◆ Breakout Detection (Impulse + Volume Gate)
A breakout triggers when price closes beyond the consolidation range boundary
with two conditions on the same bar: (1) the candle body exceeds a configurable
ATR multiple (default 0.8x ATR), confirming impulse momentum, and (2) volume
exceeds a multiple of the 20-bar average (default 1.5x). Breakouts evaluate on
bar close and are non-repainting by default; an optional Allow Repainting mode
enables intrabar updates.

◆ Quality Grading Pipeline (A/B/C)
Each breakout receives a weighted quality score from three components:
Volume Score (40%): volume / SMA(volume, 20) scaled to 0-100 (2x average = 100).
Momentum Score (40%): candle body / ATR scaled to 0-100 (1x ATR body = 100).
Delta Score (20%): checks if LTF intrabar delta aligns with breakout direction
(buying pressure on bull break, selling pressure on bear break). Aligned = 80,
misaligned = 30. The combined score maps to grades: A (70+), B (40-69), C (below 40).

◆ Entry Anchor
Entry is the close of the breakout (confirmation) bar. This is the first price
that can actually be acted on once the breakout is confirmed on bar close, so the
marker reflects a real fill rather than a level price had already passed.

◆ Component Interaction
The pipeline flows: Squeeze Detection identifies the consolidation range, which
feeds into Breakout Detection as the boundary levels. Breakout Detection triggers
Quality Grading, which scores the breakout using volume, momentum, and delta.
Each stage depends on the output of the previous one - they form a causal chain,
not independent features.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT

◆ Dual Squeeze Gate
Unlike a typical consolidation breakout that fires on a single fixed range
threshold, detection here combines a relative compression percentile with an
absolute ATR width cap. The percentile adapts to each market; the cap rejects
wide ranges that only look compressed relative to an extreme stretch. Together
they keep breakouts anchored to genuinely tight consolidations.

◆ Quality Grading System
Every breakout is scored with a three-component weighted formula (volume,
momentum, delta) and assigned an A/B/C grade, filtering out weak breakouts that
lack volume confirmation or delta alignment.

◆ LTF Delta Confirmation
Uses lower-timeframe intrabar data to classify buy and sell volume within each
chart bar. Delta alignment with breakout direction adds a layer of confirmation
beyond simple volume analysis.

◆ Honest Entry Marker with Price
The entry is anchored at the breakout close and labeled with the exact price, not
back-dated to a level price has already crossed. What you see is a fill you could
have taken.

◆ Informative Consolidation Zone
The broken range is drawn as a box with the breakout edge highlighted (the side
price escaped) and a caption showing the consolidation duration and its width in
ATR, so the quality of the base is readable at a glance.

◆ Optional Regime Gate
An ATR volatility regime (HIGH / NORMAL / LOW) is shown on the dashboard and can
optionally gate breakouts. The breakout edge is strongest in normal volatility
and weaker in extreme-high ATR, so the gate lets you keep only the regimes where
breakouts follow through best, without changing the core detection.

◆ Clean Chart
Each breakout leaves a tight range box, a direction marker, and the entry price
tag. Older setups are capped to a configurable count so the chart stays readable
instead of accumulating clutter.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD

Real-time panel (configurable position) with key metrics:
  • Status - current state: SQUEEZE, BREAKOUT (with grade), or idle
  • Last Breakout - direction, grade, and bars since last breakout
  • ATR Regime - current volatility classification (HIGH/NORMAL/LOW)
  • Squeeze - active squeeze duration in bars
  • LTF Source - lower timeframe resolution or fallback mode


Legend table (bottom left) explains every chart element. Toggle in Dashboard settings.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS

Engine
  • LTF Resolution - 1 min (lower timeframe for delta calculation)
  • Lookback Period - 20 bars (range calculation window)
  • Squeeze Percentile - 30 (compression rank vs last 100 bars)
  • Max Range - 4x ATR (absolute width cap for a valid squeeze)
  • Min Squeeze Bars - 5 (minimum bars to validate squeeze)
  • Impulse Body - 0.8x ATR (minimum candle body for breakout)


Quality
  • Volume Filter - 1.5x average (minimum volume ratio for breakout)
  • Show Grade Labels - ON (A/B/C badge next to each breakout marker)


Filters
  • HTF Trend Filter - OFF (align with higher timeframe direction)
  • HTF Timeframe - Daily
  • HTF MA Length - 50 bars
  • Regime Filter - Off (optional ATR-regime gate: Normal only / Exclude High ATR)


Visualization
  • Colors - Bullish (blue), Bearish (red), Accent (orange)
  • Squeeze Boxes - ON (consolidation range display)
  • Entry Marker - ON (entry level at the breakout close)
  • Max Visible Setups - 10
  • Color Candles - OFF


Dashboard
  • Show Dashboard - ON (real-time status panel)
  • Dashboard Position - Top Right
  • Show Legend - ON (chart element key)


Alert Settings
  • Allow Repainting - OFF (breakouts confirm on bar close)
  • JSON Alerts (for bots) - OFF (structured payload via the alert() call)


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ ALERTS

  • Bullish Breakout - consolidation breakout to the upside with quality grade
  • Bearish Breakout - consolidation breakout to the downside with quality grade


With JSON Alerts ON, the alert() call emits a structured payload with action,
direction, grade, quality, ticker, price, timeframe, and indicator fields - use
"Any alert() function call" as the TradingView alert event to receive every
breakout as JSON on one alert.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The protected source contains the weighted quality-grading pipeline (the
volume / momentum / LTF-delta component weights) and the dual squeeze gate (the
relative percentile combined with the absolute ATR width cap). Exposing the exact
weights and thresholds would let any developer reproduce the grading and the
detection identically, eliminating the empirical tuning that distinguishes this
implementation from a basic breakout script.

Best regards,
EXCAVO


Disclaimer
Trading involves significant risk. This indicator is a technical analysis tool
and does not constitute financial advice, investment recommendations, or a
guarantee of future results. Past indicator behavior does not guarantee future
performance. Always use proper risk management and your own judgment.

הערות שחרור
Engine: three new structural filters

  • Min Range (xATR), default 1.5. Rejects micro-zones where a stop would sit inside the natural noise band. Set to 0 to disable.
  • Setup Expiry (bars), default 15. The squeeze no longer fires once this window after it ended has passed, preventing late re-breaks on stale zones.
  • Max Breakout Bar (xATR), default 2.5. Bars whose full high-low range exceeds the cap are skipped as climax candles. Set to 0 to disable.


Quality: explicit Min Grade gate

  • New Min Grade input with options "A only" (default), "A or B", and "All".
  • Grade composite rebalanced from three to five factors: volume, momentum body, wick quality, squeeze duration, and LTF delta alignment. The Grade A threshold was lowered so the A / B / C distribution is meaningful instead of pinning every fire at A.


Filters: HTF slope and regime defaults

  • HTF Trend Filter default ON. The gate now requires BOTH price above the HTF MA AND the MA itself sloping in the breakout direction. Flat HTF chop is rejected in both directions.
  • New HTF MA Slope Length input tunes the slope lookback (default 5 HTF bars).
  • Regime Filter default "Exclude High ATR". The weakest backtest regime is filtered out by default.


Engine corrections

  • ATR regime gate now reads the prior bar's percentile. Without this fix, the breakout candle's own range inflated the regime to HIGH and self-disqualified the fire.
  • The squeeze high and low used for the breakout test are taken from the prior bar, so the breakout candle's own range cannot push the boundary up to its own high and delay the fire.
  • Min Squeeze Bars default raised from 5 to 8 to reduce noise on weak consolidations.


Optimal timeframe

  • 4h is the validated primary timeframe across BTC, ETH, and SOL on five years of data. Lower timeframes lose the structural edge.
הערות שחרור
Optional Trailing Stop exit mode

This update adds an optional exit-management layer on top of the
existing v7.2 entry detection. Default behaviour is unchanged.

New: Exit Mode input
A new "Exit Mode" group with the choice "Off (markers only)" (default)
or "Trailing Stop". Off keeps the indicator behaving exactly as before.
Trailing Stop adds a per-trade exit line that rides the running peak
on long trades or the running trough on short trades, at a
configurable ATR distance.

New: ATR-anchored trailing stop mechanic
On a confirmed breakout, the ATR at the entry bar is captured and
held constant for the lifetime of the trade. The initial stop sits at
entry minus the configured Stop multiplier x ATR-at-entry. Each new
bar updates the peak (long) or trough (short); the trailing stop is
the maximum of the initial stop and peak minus Trail multiplier x
ATR-at-entry. The stop only moves one direction: up for longs, down
for shorts.

New: live stop visuals
While a trade is open, a dashed initial-stop line and a solid live
trail line are drawn from the entry bar. When the low pierces the
trail (long) or the high pierces it (short), both lines freeze at the
exit bar and a direction marker plus the realised R value are
printed.

New defaults (only used in Trailing Stop mode)
Initial Stop = 1.5 xATR.
Trail Distance = 6.0 xATR.

New alertconditions
Trail-Stop Exit Long and Trail-Stop Exit Short. Both fire only when
Exit Mode = Trailing Stop. The JSON payload is extended with an exit
event carrying direction and realised R.

Backwards compatibility
With Exit Mode = Off (the default), all v7.2 visuals, alerts and
JSON payloads are preserved unchanged. The new mode is purely
additive. No configuration changes are required after the update.

Internal
Pattern A line anchoring for the new stop lines. JSON alerts continue
to fire on confirmed bar close only.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.