INVITE-ONLY SCRIPT

PCCE + False Breakout Detector

55
PCCE + False Breakout Detector

Type: Invite-Only Indicator (closed source)
Purpose: Detect price compression and the first expansion after it, while flagging failed breakouts (bull/bear traps) for risk control.

1) What’s original here!

This tool integrates three behaviour-driven tests that work in a single decision flow:
A compression score built from:
(a) monotonic body shrink,
(b) wick-dominance, and
(c) relative range contraction versus history.
This is not a bands/oscillator port; it’s a structure-first filter that isolates coils.

A thrusted expansion requirement that combines real-body impulse and relative-volume participation (+ optional EMA alignment) to qualify a breakout beyond the coil envelope.

An immediate post-breakout failure test (trap logic) that checks whether the breakout re-enters the prior swing range within a short window.

Used together, these steps turn raw breaks into contextual, risk-aware events: setup → trigger → validation. That is the value of the combination.



2) Concepts behind the calculations:

Let body_t = |close_t − open_t|,
uw_t = high_t − max(open_t, close_t) (upper wick),
lw_t = min(open_t, close_t) − low_t (lower wick),
R_t(k) = highest(high, k)_t − lowest(low, k)_t (range over k bars),
MA_body(k) = SMA(body, k), MA_vol(k) = SMA(volume, k).

2.1 Compression (coil) detection

We evaluate within a window k = coilLength:
• Body shrink count: number of consecutive steps where body_(t−i) < body_(t−i−1).
• Wick dominance: AvgWickBody = avg( (uw + lw) / body ) over the window; require AvgWickBody > wickRatioMin.
• Relative range contraction: current R_t(k) must be less than α × avg( R_(t−j)(k) ) computed over a lookback of rangeWindow windows, with α < 1 (tight market).

When all three are true, we mark a coil zone; the coil bounds are High_coil = highest(high, k), Low_coil = lowest(low, k).

2.2 Expansion (“Burst”) confirmation

A breakout is only qualified when all hold on bar close:
• Direction: close > High_coil → up; close < Low_coil → down.
• Body thrust: body_t > MA_body(k) × bodyMult.
• Participation: volume_t > MA_vol(k) × volumeMultiplier.
• Trend alignment (optional): close_t > EMA(emaLen) for up / < EMA for down.
• Cooldown: t − lastSignal > cooldownBars.

If satisfied, print Burst↑ or Burst↓ on that bar.

2.3 Failed breakout (trap) detection

Let H_s and L_s be the prior swing high/low from a lookback rangeLookback (excluding the current bar). Define:
• Bull break attempt: a bar that closed above H_s.
Bull trap: within fakeoutBars bars after that attempt, any close returns below H_s. Mark ❌ red above that bar.
• Bear break attempt: a bar that closed below L_s.
Bear trap: within fakeoutBars bars after that attempt, any close returns above L_s. Mark ❌ green below that bar.

Alerts fire on bar close only.



3) What you’ll see on the chart
• Coil box: shaded envelope (tight-range bounds).
• Burst labels: Burst↑ / Burst↓ only when thrust + volume (and optional EMA) confirm the break.
• Trap markers: ❌ red (failed bullish breakout) / ❌ green (failed bearish breakout).
• Alerts: “Burst Up” and “Burst Down” (close-based).



4) How to use it
1. Preparation: When a coil box appears, mark the bounds; expect expansion risk to rise.
2. Trigger: Act only on Burst labels (they already encode body/volume thrust and optional trend).
3. Validation: If a ❌ trap prints shortly after a breakout, treat it as a warning/exit event; breakouts that re-enter the prior swing range are statistically fragile.
4. Context: Works well on 15m–4H where structure is visible. Combine with your own higher-timeframe bias, S/R, liquidity pools, and risk rules.
5. Tuning:
• Tighten/loosen coil sensitivity via coilLength, wickRatioMin, and the range contraction factor.
• Use larger bodyMult / volumeMultiplier to demand stronger breaks.
• cooldownBars controls clustering in fast sessions.
• rangeLookback and fakeoutBars control how strict the trap check is.



5) Repainting, scope, and limitations
• Burst and trap labels are evaluated on bar close; once printed, they do not repaint. Coil boxes can update while forming; they stabilize once conditions are met.
• Sudden news/illiquid periods can defeat filters; adjust multipliers and cooldown for your instrument.
• This is an indicator, not a strategy; it does not publish PnL, win-rate, or forward promises.


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.