OPEN-SOURCE SCRIPT
Liquidity Trap Zones [EmpArchitect]

█ What This Does
This indicator detects a strict failed-reversal event:
A candle attempts to reverse → the very next candle closes beyond its extreme with displacement → that failed candle's range becomes the trap zone.
These are the zones where countertrend orders are now trapped and may fuel the continuation move.
One pattern. Multiple vocabularies.
- ICT traders will recognize the same event through breaker / mitigation logic
- Wyckoff traders may read it as a spring or upthrust-style trap
- Classical price action sees a failed breakout
- Retail traders call it a bull or bear trap
The detection is the same in every case.
█ How It Works
Formation (strict 1-bar invalidation):
1. Bar N-1: failed reversal candle (bearish for bullish traps, bullish for bearish traps)
2. Bar N: closes beyond bar N-1's extreme with displacement body ≥ C-grade threshold
3. The range of bar N-1 becomes the trap zone
Grading (fixed at formation, never changes):
• A-grade: body ≥ 2.5 × ATR — strong displacement
• B-grade: body ≥ 1.7 × ATR — moderate displacement
• C-grade: body ≥ 1.2 × ATR — minimum valid
Opacity encodes grade visually — A is most saturated, C is most transparent.
Zone lifecycle:
• Fresh — not yet touched. Full color, extends right.
• Tested — price wicked into the zone (optional, off by default).
• Resolved — price closed beyond the opposite edge. Zone deleted immediately.
Directional bias filter:
Optional rolling HH/LL expansion filter. This is NOT swing-confirmed BOS — it is a lightweight structure bias. Toggle off to see all raw detections.
█ Vocabulary Toggle
Choose your label language in settings. Detection is identical in all modes:
• Plain / ICT: Bull B · 76,400.0 / Bear A · 79,200.5
• Wyckoff: Spring B · 76,400.0 / UT A · 79,200.5
█ Display Controls
• Max Bull / Bear Zones — caps visible zones per direction. Oldest deleted when exceeded.
Recommended: 15m = 2 | 1H = 3 | 4H = 5
• Show Tested Zones — off by default for cleaner charts
• Extend Fresh Right — fresh zones extend to the right edge
• Show Trigger Markers — marks the displacement candle with ◆ grade
• Small status card shows current bias and zone counts
█ Non-Repainting
All zones are confirmed on closed bars only.
Formation requires bar N-1 to be fully closed.
Displacement is confirmed when bar N closes — never mid-bar.
No future bar data is used at any point in the logic.
█ Pairs With
Smart Liquidity Map [EmpArchitect] — the map shows where liquidity sits. Trap Zones show where it gets taken.
█ Alerts
• Bull Trap Zone Formed
• Bear Trap Zone Formed
• Any Trap Zone Formed
This indicator detects a strict failed-reversal event:
A candle attempts to reverse → the very next candle closes beyond its extreme with displacement → that failed candle's range becomes the trap zone.
These are the zones where countertrend orders are now trapped and may fuel the continuation move.
One pattern. Multiple vocabularies.
- ICT traders will recognize the same event through breaker / mitigation logic
- Wyckoff traders may read it as a spring or upthrust-style trap
- Classical price action sees a failed breakout
- Retail traders call it a bull or bear trap
The detection is the same in every case.
█ How It Works
Formation (strict 1-bar invalidation):
1. Bar N-1: failed reversal candle (bearish for bullish traps, bullish for bearish traps)
2. Bar N: closes beyond bar N-1's extreme with displacement body ≥ C-grade threshold
3. The range of bar N-1 becomes the trap zone
Grading (fixed at formation, never changes):
• A-grade: body ≥ 2.5 × ATR — strong displacement
• B-grade: body ≥ 1.7 × ATR — moderate displacement
• C-grade: body ≥ 1.2 × ATR — minimum valid
Opacity encodes grade visually — A is most saturated, C is most transparent.
Zone lifecycle:
• Fresh — not yet touched. Full color, extends right.
• Tested — price wicked into the zone (optional, off by default).
• Resolved — price closed beyond the opposite edge. Zone deleted immediately.
Directional bias filter:
Optional rolling HH/LL expansion filter. This is NOT swing-confirmed BOS — it is a lightweight structure bias. Toggle off to see all raw detections.
█ Vocabulary Toggle
Choose your label language in settings. Detection is identical in all modes:
• Plain / ICT: Bull B · 76,400.0 / Bear A · 79,200.5
• Wyckoff: Spring B · 76,400.0 / UT A · 79,200.5
█ Display Controls
• Max Bull / Bear Zones — caps visible zones per direction. Oldest deleted when exceeded.
Recommended: 15m = 2 | 1H = 3 | 4H = 5
• Show Tested Zones — off by default for cleaner charts
• Extend Fresh Right — fresh zones extend to the right edge
• Show Trigger Markers — marks the displacement candle with ◆ grade
• Small status card shows current bias and zone counts
█ Non-Repainting
All zones are confirmed on closed bars only.
Formation requires bar N-1 to be fully closed.
Displacement is confirmed when bar N closes — never mid-bar.
No future bar data is used at any point in the logic.
█ Pairs With
Smart Liquidity Map [EmpArchitect] — the map shows where liquidity sits. Trap Zones show where it gets taken.
█ Alerts
• Bull Trap Zone Formed
• Bear Trap Zone Formed
• Any Trap Zone Formed
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
SMC structure tools — no signals, just the map. Free alerts → t.me/smc_scanner_free | Scanner PRO → whop.com/smc-scanner | @EmpArchitect
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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
SMC structure tools — no signals, just the map. Free alerts → t.me/smc_scanner_free | Scanner PRO → whop.com/smc-scanner | @EmpArchitect
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.