OPEN-SOURCE SCRIPT

Breaker Block Reversal Engine [forexobroker]

946
Breaker Block Reversal Engine [forexobroker] trades the polarity flip of a failed order block: when price closes straight through an order block instead of respecting it, that zone flips polarity and the level that trapped one side now fuels the other. The unique angle is treating the flip as a persistent regime, then timing entries with an EMA reclaim inside the active breaker bias rather than waiting only for the rarer classic retest.

🔶 ALGORITHM

1. Confirm swing structure with symmetric pivots and track the most recent confirmed swing high and low.
2. Detect a structural break: close crosses the last confirmed swing low (down break) or swing high (up break).
3. Find the origin candle by scanning back up to OB Search Lookback bars for the last opposing candle; validate the impulse with Min Impulse x ATR.
4. Polarity flip: a bearish origin OB becomes a BULLISH breaker once the break reference (close or high) closes above its top; a bullish origin OB becomes a BEAR breaker once price closes below its bottom. Confirm-on-close toggle controls strictness.
5. Retest detection uses a Retest Buffer x ATR tolerance band drawn around the flipped breaker.
6. Persistent breaker bias: a flip arms bias +1 / -1; the regime clears when that breaker is retested (one-shot) or the opposite breaker flips.
7. Entry timing: within an active breaker bias, an EMA reclaim (ta.crossover / ta.crossunder of close vs the Entry Reclaim EMA) fires the trade. Retest-Only Mode swaps this for the strict breaker-zone retest.

🔶 SIGNAL LOGIC

- Buy: a bear order block has flipped to a bull breaker (bias +1) and close crosses over the Entry Reclaim EMA (or, in Retest-Only Mode, the bull breaker retest), in session, position not already long, after the cooldown window, only on barstate.isconfirmed; position-lock flips to LONG.
- Sell: a bull order block has flipped to a bear breaker (bias -1) and close crosses under the Entry Reclaim EMA (or the bear breaker retest), in session, position not already short, cooldown elapsed, on barstate.isconfirmed; position-lock flips to SHORT.
Only fires when a breaker has flipped polarity and set directional bias.

🔶 INPUTS

- Structure: pivot length for swing confirmation (default 7), OB search lookback, and ATR length.
- Impulse filter: minimum impulse in ATR multiples to qualify the origin (default 1.0x ATR).
- Retest tolerance: buffer added around the breaker on retest in ATR multiples (default 0.10x ATR).
- Break confirmation: confirm-on-close toggle for the polarity flip (default on).
- Signal Logic: Entry Reclaim EMA length (default 9) and Retest-Only Mode toggle (default off).
- Cooldown: minimum bars between signals (default 6).
- Filters: optional session restriction and one-signal-per-breaker lock (default on).
- Visual: breaker zone boxes, dashboard, 3-layer glow, buy/sell colors, dashboard background.

🔶 ALERTS

BBR Buy, BBR Sell, BBR Any Signal, BBR Down Break, BBR Up Break, BBR Bull Flip, BBR Bear Flip, BBR Bull Retest, BBR Bear Retest, BBR Bull OB Set, BBR Bear OB Set, BBR Structure, BBR Webhook JSON.

🔶 LIMITATIONS

- Requires warm-up: pivots confirm only after Pivot Length bars on each side, so early history yields no structure.
- Defaults are tuned for liquid instruments; the impulse and retest-buffer ATR multiples may need adjustment on thin symbols.
- Retest-Only Mode is intentionally rare; the default EMA-reclaim regime mode trades more frequently.
- Non-repainting by design (pivots confirmed, signals on bar close); the anchoring swing appears Pivot Length bars after it formed.
- A breaker is a probabilistic zone, not a guaranteed reversal; polarity flips can fail in strong trends.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.