OPEN-SOURCE SCRIPT
Cập nhật

Rejection Block Quality [AGPro Series]

11 585
Rejection Block Quality [AGPro Series]

🔹 OVERVIEW

Rejection Block Quality is an ICT-inspired detector that identifies long-wick rejection candles at swept swing pivots and grades each block by objective quality criteria. Unlike Order Block logic — which anchors to the last opposite-direction body before displacement — a Rejection Block (RB) is born from a wick that pierces a prior swing liquidity pool and closes back inside it, with the body confirming displacement on the follow-through bar. The rectangle is drawn from the wick base to the candle body, capturing the exact zone where smart money absorbed the sweep.

🎯 UNIQUE EDGE

Three design choices separate this tool from generic wick or order block indicators:

• Swing-pivot sweep requirement — a rejection is only counted when price sweeps a confirmed swing high or low before the reversal close. Stand-alone wick patterns without liquidity context are filtered out.

• Displacement confirmation window — the candle following the rejection must travel at least 0.6× ATR in the reversal direction, within a 1–5 bar lookahead. No displacement, no block.

• Quality tiering (A / B / C) from three orthogonal factors — wick-to-body ratio, displacement magnitude, and untested freshness. An exceptional wick ratio (≥5× body) promotes a block to A tier regardless of other scores, preserving rare high-conviction rejections.

🛠️ METHODOLOGY

Detection pipeline on every bar:

1. Confirm a pivot sweep using a user-configurable lookback (default 5 bars each side).
2. Check the wick-to-body ratio against a minimum threshold (default 1.8×), with the dominant wick on the sweep side.
3. Queue the candle as a pending block and wait for displacement confirmation.
4. Measure displacement as price travel from the body reference over 1 to 5 bars, normalized by ATR.
5. On confirmation, draw the RB zone from the wick base to the body, record the tier, and begin lifecycle tracking.

Zone lifecycle tracks four events — test (price enters the zone), hold (price exits without a body close through the far edge), break (body close through the far edge), and near miss (price approaches within a configurable ATR band without entering). All events are edge-detected to prevent inflated counts when price lingers near a zone.

📊 SIGNALS & ALERTS

• New block formation label — A / B / C tier plus wick ratio, placed with anti-collision offset.
• Test markers (T) — one per zone entry event, with cooldown to prevent visual clutter.
• Break markers (B) — placed when a zone is invalidated by a body close.
• Wick border highlight — thick colored line on the originating rejection candle.
• Alerts — configurable minimum tier (A, B, or C) fires once per bar close for each qualifying new block.

⚙️ KEY INPUTS

• Detection — Pivot Length, Min Wick-to-Body Ratio, ATR Length, Min Displacement (× ATR), Displacement Confirm Window.
• Zone Management — Max Active Zones per Side, Zone Right Extension, Near-Miss Distance, Near-Miss Cooldown, Break Requires Full Body Close.
• Visuals — Show Zones, Show Tier Labels, Highlight Rejection Wick Border, Show Test / Hold / Break Markers, Zone Fill Opacity, Label Font Size.
• Panel — Show Panel, Panel Location, Panel Font Size, Panel Theme (Dark / Light).
• Alerts — Minimum Tier for Alerts.

🧭 HOW TO USE

Start on a higher timeframe (4H or 1D) to identify macro RB zones, then drill down to execution timeframes for entries. Treat A-tier blocks as the highest-conviction zones, B-tier as situational, and C-tier as context-only. Combine with trend filters, higher-timeframe structure, and risk management — a Rejection Block is a zone of interest, not a standalone buy or sell signal. Use the panel statistics to evaluate how the selected symbol and timeframe have historically respected these zones before committing to them in live decision-making.

⚠️ LIMITATIONS & TRANSPARENCY

This indicator is a structural detector, not a trading strategy. It does not forecast price direction, generate entry or exit orders, or calculate position sizing. The Success Rate statistic reflects how often past tests on detected zones held versus failed within the visible history — it is a descriptive metric, not a performance projection. Zone detection is historical and reactive: a block only appears after the displacement bar closes, so interpretation on live-forming bars is tentative. Performance varies by symbol, timeframe, and market regime.

⚠️ RISK DISCLOSURE

Trading involves substantial risk of loss. Past behavior of any pattern does not guarantee future outcomes. Use this tool as part of a complete analytical framework that includes your own risk management, position sizing, and broader market context. Nothing in this indicator or description constitutes financial advice.
Phát hành các Ghi chú
🔧 UPDATE NOTES - V2.2

This update restores the visible rejection-zone identity while keeping the cleaner V2 lifecycle improvements.

The core purpose of the script remains unchanged.
This release corrects the overly aggressive V2.1 visual cleanup by bringing historical rejection zones back into the default view.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


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

• Restored the default zone layer
Historical rejection zones are visible by default again because the zone structure is a core part of this script's public appeal.

• Kept closed-state label clutter under control
Expired and invalidated zone text remains hidden by default, so the chart keeps the zones without becoming filled with archive labels.

• Increased zone projection
The default zone extension is longer again, closer to the original visual identity of Rejection Block Quality.

• Increased default visible zones
The default visible-zone count is restored to support the stronger public screenshot style of this script.

• Preserved the improved decision engine
The 0-100 score, survival score, reclaim state, and action-state logic remain active.


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

• Zones are back as first-class visual objects.

• Mature zones remain visible with a softer appearance instead of disappearing.

• Large expired / invalid text is not shown by default.

• Bullish and bearish zones keep clear AGPro color separation.


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

• Show Historical Zones is enabled by default.

• Show Closed-State Labels remains disabled by default.

• Users can still hide historical zones manually if they prefer a very minimal chart.

• Panel location, panel theme, panel font size, and label font size controls remain unchanged.


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

This update protects the original identity of one of the strongest AGPro public scripts.

The script remains focused on rejection blocks and does not become an Order Block, Breaker Block, or generic support/resistance map.

The goal is to keep the premium zone-based chart appeal while improving interpretation through the newer lifecycle panel.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may affect how rejection blocks appear and survive.

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 guaranteed trading outcomes.

Users remain responsible for their own decisions.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.