OPEN-SOURCE SCRIPT
Telah dikemas kini

Breaker Block Engine [AGPro Series]

12 604
Breaker Block Engine [AGPro Series]

Overview

Breaker Block Engine is a dedicated detection and tracking tool for one of the
most misunderstood concepts in Smart Money trading: the Breaker Block. A
breaker block is an order block that has failed and flipped role — a bearish
order block broken upward now behaves as bullish support, and a bullish order
block broken downward now behaves as bearish resistance. The engine does not
just draw them; it validates each break with displacement strength, tracks
every retest, scores how well each breaker has held its role, and surfaces the
dominant bullish and bearish breakers through a clean info panel.

Unique Edge

Most breaker block scripts stop at drawing a flipped zone. This engine goes
further:
- Each break is validated using an ATR-scaled close-based displacement filter,
optionally combined with above-average volume confirmation, to reject weak
wick-based breaks.
- Every retest of a breaker is counted and evaluated as Held or Lost, and the
state label on the chart shows a live retest hold percentage for each
breaker (for example "Bull Breaker | Held x6 (100%)").
- An invalidation buffer prevents single-wick noise from prematurely killing
otherwise healthy breakers, while genuinely violated zones fade into a gray
"Lost" state and are removed from tracking shortly after.
- Intra-side and cross-side confluence grouping automatically clean up
overlapping labels so the chart stays readable even when several breakers
cluster within half an ATR.
- The info panel summarises the whole picture in one glance: dominant side,
active counts per side, nearest breaker distance in both price and ATR
multiples, and overall retest hold percentage.

Methodology

1. Swing Detection. Confirmed pivot highs and pivot lows are identified using
a configurable pivot length. These pivots anchor the search for order
block candidates.
2. Order Block Candidate. For each confirmed pivot high, the script walks
back up to ten bars looking for the last bearish candle — this is the
bearish order block candidate. The symmetrical process identifies bullish
order block candidates around pivot lows.
3. Break Validation. A candidate is promoted to a breaker only when price
closes past the opposite edge of the order block by at least a
user-defined ATR multiple (default 0.75 × ATR). An optional volume
confirmation filter can additionally require the break candle to trade
above its volume moving average.
4. Retest & Hold Scoring. After formation, each breaker is checked every bar.
If price re-enters the zone and the close respects the breaker's intended
direction, a Hold is recorded; otherwise the retest is counted but not
held. A minimum bar spacing prevents consecutive bars of a sustained
retest from inflating the counter.
5. Invalidation. If price closes past the far edge of the breaker by more
than the invalidation buffer (in ATR), the breaker is marked Lost,
visually faded, and removed from active tracking after a short grace
period.
6. Confluence Grouping. On the most recent bar, breakers whose mid-points
sit within max(0.5 × ATR, 0.5 % of price) of each other have their
overlapping state labels resolved: dead labels yield to alive labels,
older labels yield to newer ones. A cross-side pass prevents stale
opposite-side labels from sitting on top of active ones.

Signals & Alerts

The script provides three alert events:
- New Breaker: fires on the bar a bullish or bearish breaker is confirmed.
- Retest Hold: fires when price retests an active breaker and the close
respects the zone direction.
- Invalidation: fires when an active breaker is broken in the opposite
direction beyond the invalidation buffer.
On-chart signals include the zone itself (coloured by side), a small
directional triangle at the break point, and a dynamic state label on the
right edge showing the breaker's test count and hold percentage.

Key Inputs

- Swing Pivot Length: bars on each side used to confirm swings. Higher values
produce fewer but structurally stronger swings.
- Max Active Breakers per Side: hard cap on simultaneously tracked bullish
and bearish breakers; oldest are pruned when the limit is reached.
- Displacement Strength: ATR multiple required for a close-based break to
validate. Higher values produce fewer, stronger breakers.
- Require Volume Confirmation: when enabled, the break candle must trade
above its volume moving average.
- Invalidation Buffer: ATR buffer added beyond the breaker edge before the
breaker is considered invalidated. Prevents wick-based noise kills.
- Min Bars Between Retests: minimum bar spacing between consecutive retests
of the same breaker, keeping counters from inflating on sustained visits.
- Zone Transparency, Colours, Label & Panel Sizes: full visual control.
- Panel Location, Theme, Far Zone Threshold: the info panel can be placed in
any of six positions, switched between Dark and Light theme, and the
threshold for labelling distant zones as "Far" is user-configurable.

How to Use

- On mid-to-high timeframes (15m and up), leave the defaults. The engine is
tuned for 15m to 4h out of the box but works on any timeframe and
instrument.
- Use the state label hold percentage as a quality gauge. A breaker with a
long history of holds (for example "Held x6 (100%)") has demonstrated
institutional interest at that level; a breaker with mixed results deserves
more caution.
- Use the panel to orient quickly. If the dominant side is Bullish and the
nearest bullish breaker sits within a fraction of an ATR, the chart is in
a supportive regime for long bias; if both nearest values show "Far",
price is floating between structures and caution is warranted.
- Combine with higher-timeframe context. A bullish breaker on the 1h that
aligns with a bullish breaker on the 4h is a stronger zone than either
alone.

Limitations & Transparency

- This is an indicator, not a strategy. It draws zones and tracks their
behaviour; it does not generate buy or sell orders, manage positions, or
calculate performance statistics against a price series.
- Pivot-based detection is inherently lagging by the pivot length: a swing
is only confirmed once the configured number of bars have printed past it.
- Results depend on input choices. Different displacement multipliers, pivot
lengths, and retest gaps will produce different breaker sets. The defaults
are a starting point, not a recommendation.
- No indicator can guarantee future behaviour. A breaker that has held ten
times in the past can fail the next time it is tested.

Risk Disclosure

This script is provided for educational and research purposes only. It is not
financial advice and does not constitute a recommendation to buy, sell, or
hold any instrument. Trading carries substantial risk of loss. Users are
solely responsible for their own trading decisions and risk management. Past
behaviour of a breaker, or of any zone shown by this script, does not
guarantee future results.
Nota Keluaran
🔧 UPDATE NOTES - V2.0

This update focuses on lifecycle clarity, decision scoring, visual structure, and trade-planning context.

The core purpose of the script remains unchanged.
Breaker Block Engine still tracks failed order-block transitions that flip role after a confirmed displacement break.

This release improves how each active breaker is evaluated, presented, and interpreted on the chart.
It does not attempt to predict price direction or provide certain outcomes.


------------------------
What Changed
------------------------

• Added a 0-100 Breaker Lifecycle Score
Each active breaker now receives a structured score based on origin quality, retest response, reclaim behavior, reaction count, and time decay.

• Added clear next-action states
The panel now translates the active breaker context into READY, Monitor, Wait Retest, Reduce Trust, Stand Aside, or Remove Context.

• Added optional invalidation and target guide rails
Each active breaker can show a concept-native invalidation rail and a target guide line based on the breaker edge and risk distance. These rails are optional and disabled by default to preserve the original clean chart style.

• Added breaker defense state tracking
The engine now separates Fresh, Testing, Defended, Weakening, Aging, and Invalidated breaker states.

• Added lifecycle fading
Older breaker zones gradually soften through expiry shading so fresh context stays visually prioritized.


------------------------
Visual Improvements
------------------------

• Added centered breaker labels inside active zones for clearer zone identity.

• Added optional compact NEW, READY, HOLD, and LOST labels outside candle bodies.

• Improved visual hierarchy with score-based label coloring.

• Added a visible cap for recent event labels when that optional layer is enabled.

• Refined invalidation and target context so risk logic is available without turning the default chart into a generic S/R map.


------------------------
Interface & Usability
------------------------

• Rebuilt the panel around the roadmap fields:
Breaker Side, Retest Quality, Defense State, Invalidation, and Action.

• Preserved the AGPro panel standard with one merged blue header row containing only the script name.

• Added configurable panel location, panel theme, panel font size, and label font size.

• Kept the panel visible by default with a show/hide input.

• Added Sensitivity, Confirmation Mode, Minimum READY Score, lifecycle decay, optional event-label controls, and optional target guide controls.


------------------------
Behavior Notes
------------------------

This update preserves the Breaker Block Engine identity.

The script remains focused on breaker blocks only:
failed order-block transitions that flip role after displacement.

The default visual style intentionally stays close to the popular published version:
breaker zones, compact breaker labels, break markers, and a clean AGPro panel.

It does not become a generic Order Block scanner.
It does not become a Fair Value Gap map.
It does not add generic support/resistance zones.

The goal is to improve decision support around breaker lifecycle quality, not to introduce predictive behavior.


------------------------
Alerts
------------------------

The update includes alert conditions for:

• New Bullish Breaker
• New Bearish Breaker
• Bullish Breaker READY
• Bearish Breaker READY
• Bullish Breaker Retest Hold
• Bearish Breaker Retest Hold
• Bullish Breaker Invalidated
• Bearish Breaker Invalidated

Alerts are attention markers.
They are not trade instructions.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Pivot-based breaker detection is confirmed only after the required swing lookback has completed.

Market conditions such as volatility, liquidity, and timeframe differences may affect how breaker zones appear and how quickly they decay.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or certain trading outcomes.

Users remain responsible for their own decisions.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.