OPEN-SOURCE SCRIPT
Cập nhật Smart Liquidity Map [EmpArchitect]

What It Does
Smart Liquidity Map detects equal highs (EQH) and equal lows (EQL) — areas where price has formed matching levels on consecutive bars — and tracks them as live liquidity zones. These zones represent resting stop-losses and pending orders that larger participants often target before continuing a move.
The indicator also plots Previous Day High/Low (PDH/PDL) and Previous Week High/Low (PWH/PWL) as key structural reference levels, and detects when price sweeps through any of these levels — EQH, EQL, PDH, PDL, PWH, or PWL — then closes back inside. Sweep events are marked with ⚡ labels directly on the chart for easy historical scanning.
Everything is displayed in a clean overlay with a live dashboard showing active zone counts, daily sweep count, and current level values.
How It Works
EQH/EQL Detection uses an adaptive tolerance based on a smoothed average of bar-to-bar volatility. When two consecutive bars print highs (or lows) within this tolerance window, the indicator marks the level and draws a shaded zone between the wick extreme and the body extreme. The tolerance auto-adjusts to whatever instrument and timeframe you're on — no manual tuning needed for crypto vs forex vs equities.
An optional RSI filter limits detection to structurally relevant areas: equal highs are only marked when RSI shows overbought tendency, and equal lows when RSI shows oversold tendency. This reduces noise in ranging conditions. Both the filter toggle and strength are adjustable.
Zone Lifecycle:
Zones extend forward bar-by-bar until one of three things happens:
Mitigation — price closes beyond the level (body mode) or touches it (wick mode). Zone is removed.
Sweep — price wicks beyond the level but closes back inside. Zone turns gray, a ⚡ marker is placed on the bar, and the bar is colored. This is the key event — liquidity was taken.
Expiry — zone survives past the configurable bar limit and is cleaned up.
PDH/PDL/PWH/PWL are drawn as horizontal reference lines anchored to the previous session's actual high/low. Dashed lines for daily levels, solid for weekly. Labels appear at the right edge. These levels update with each new session and move properly with the chart when you scroll or zoom.
Key Level Sweep Detection follows the same logic — if price wicks above PDH but closes below it, the bar is colored and a ⚡PDH label marks the event. Same for PDL, PWH, and PWL.
How To Read It
Amber zones (EQH) — liquidity sitting above price. Resting buy stops and breakout entries.
Teal zones (EQL) — liquidity sitting below price. Resting sell stops.
⚡ markers — confirmed sweep events. Price reached through a level and closed back inside.
Bar coloring — amber = bearish sweep (liquidity taken above), teal = bullish sweep (liquidity taken below).
Gray zones — swept and no longer active. Kept on chart as historical record.
Dashboard (top-right) — active EQH/EQL count, sweeps today, and current PDH/PDL/PWH/PWL values.
Both bullish and bearish outcomes are always possible at any level. A sweep above an EQH zone can lead to a reversal, or it can fail and price continues higher. The indicator shows where liquidity sits and when it gets taken — interpretation depends on surrounding structure and confluence.
Settings
Detection:
Equal Level Tolerance — sensitivity for matching consecutive highs/lows. Lower = stricter, fewer zones.
Filter by RSI / RSI Filter Strength — toggle and tune the overbought/oversold filter.
Zone Expiry — maximum bars a zone survives before auto-removal.
Sweep Type — body (close must break) or wick (any touch counts).
Levels:
Show PDH/PDL / Show PWH/PWL — toggle daily and weekly reference levels.
Level Line Lookback — how far back the level lines extend on chart.
Visual:
Fully customizable colors for bullish, bearish, and swept zones.
Toggle sweep ⚡ labels on/off.
Best Used On
Works on any instrument and timeframe. Designed for intraday and swing analysis on 5M–4H charts. On higher timeframes (Daily, Weekly), fewer EQH/EQL zones form but the ones that do tend to be more significant.
Pairs well with displacement and fair value gap analysis for confluence. If you use my Displacement Scanner [EmpArchitect], the two complement each other — displacement shows where aggressive moves happened, this indicator shows where the liquidity targets sit.
Credits
EQH/EQL detection method adapted from AlgoAlpha's proven pattern. Zone management, sweep detection engine, PDH/PDL/PWH/PWL integration, and dashboard by EmpArchitect.
Open source under Mozilla Public License 2.0.
Smart Liquidity Map detects equal highs (EQH) and equal lows (EQL) — areas where price has formed matching levels on consecutive bars — and tracks them as live liquidity zones. These zones represent resting stop-losses and pending orders that larger participants often target before continuing a move.
The indicator also plots Previous Day High/Low (PDH/PDL) and Previous Week High/Low (PWH/PWL) as key structural reference levels, and detects when price sweeps through any of these levels — EQH, EQL, PDH, PDL, PWH, or PWL — then closes back inside. Sweep events are marked with ⚡ labels directly on the chart for easy historical scanning.
Everything is displayed in a clean overlay with a live dashboard showing active zone counts, daily sweep count, and current level values.
How It Works
EQH/EQL Detection uses an adaptive tolerance based on a smoothed average of bar-to-bar volatility. When two consecutive bars print highs (or lows) within this tolerance window, the indicator marks the level and draws a shaded zone between the wick extreme and the body extreme. The tolerance auto-adjusts to whatever instrument and timeframe you're on — no manual tuning needed for crypto vs forex vs equities.
An optional RSI filter limits detection to structurally relevant areas: equal highs are only marked when RSI shows overbought tendency, and equal lows when RSI shows oversold tendency. This reduces noise in ranging conditions. Both the filter toggle and strength are adjustable.
Zone Lifecycle:
Zones extend forward bar-by-bar until one of three things happens:
Mitigation — price closes beyond the level (body mode) or touches it (wick mode). Zone is removed.
Sweep — price wicks beyond the level but closes back inside. Zone turns gray, a ⚡ marker is placed on the bar, and the bar is colored. This is the key event — liquidity was taken.
Expiry — zone survives past the configurable bar limit and is cleaned up.
PDH/PDL/PWH/PWL are drawn as horizontal reference lines anchored to the previous session's actual high/low. Dashed lines for daily levels, solid for weekly. Labels appear at the right edge. These levels update with each new session and move properly with the chart when you scroll or zoom.
Key Level Sweep Detection follows the same logic — if price wicks above PDH but closes below it, the bar is colored and a ⚡PDH label marks the event. Same for PDL, PWH, and PWL.
How To Read It
Amber zones (EQH) — liquidity sitting above price. Resting buy stops and breakout entries.
Teal zones (EQL) — liquidity sitting below price. Resting sell stops.
⚡ markers — confirmed sweep events. Price reached through a level and closed back inside.
Bar coloring — amber = bearish sweep (liquidity taken above), teal = bullish sweep (liquidity taken below).
Gray zones — swept and no longer active. Kept on chart as historical record.
Dashboard (top-right) — active EQH/EQL count, sweeps today, and current PDH/PDL/PWH/PWL values.
Both bullish and bearish outcomes are always possible at any level. A sweep above an EQH zone can lead to a reversal, or it can fail and price continues higher. The indicator shows where liquidity sits and when it gets taken — interpretation depends on surrounding structure and confluence.
Settings
Detection:
Equal Level Tolerance — sensitivity for matching consecutive highs/lows. Lower = stricter, fewer zones.
Filter by RSI / RSI Filter Strength — toggle and tune the overbought/oversold filter.
Zone Expiry — maximum bars a zone survives before auto-removal.
Sweep Type — body (close must break) or wick (any touch counts).
Levels:
Show PDH/PDL / Show PWH/PWL — toggle daily and weekly reference levels.
Level Line Lookback — how far back the level lines extend on chart.
Visual:
Fully customizable colors for bullish, bearish, and swept zones.
Toggle sweep ⚡ labels on/off.
Best Used On
Works on any instrument and timeframe. Designed for intraday and swing analysis on 5M–4H charts. On higher timeframes (Daily, Weekly), fewer EQH/EQL zones form but the ones that do tend to be more significant.
Pairs well with displacement and fair value gap analysis for confluence. If you use my Displacement Scanner [EmpArchitect], the two complement each other — displacement shows where aggressive moves happened, this indicator shows where the liquidity targets sit.
Credits
EQH/EQL detection method adapted from AlgoAlpha's proven pattern. Zone management, sweep detection engine, PDH/PDL/PWH/PWL integration, and dashboard by EmpArchitect.
Open source under Mozilla Public License 2.0.
Phát hành các Ghi chú
v1.1 Update — Major Detection UpgradeDetection:
- EQH/EQL detection now uses pivot-based logic (ta.pivothigh/ta.pivotlow) instead of adjacent-bar matching. Zones are based on actual swing structure, not coincidental bar similarity. Configurable via Pivot Left/Right Bars and Min Touches inputs.
- Adaptive tolerance still auto-adjusts to instrument and timeframe.
- Zone thickness is now volatility-normalized for visual consistency across all pairs.
New Features:
- Sweep Quality Grading: every sweep is graded A (strong wick rejection, wick > 2x body) or B (weaker rejection). Grade appears on every sweep label.
- Sweep vs Break Distinction: sweeps (wick beyond, close inside) flash gray with SWP label. Breaks (close beyond) flash dark red with BRK label. Dashboard tracks both independently.
- Touch Counter: active zones display x1, x2, x3+ showing how many times price tested without sweeping. Border width increases with touches for visual hierarchy.
- Session-Aware Zone Coloring: zones colored by the session in which the pivot formed. Teal = London, Amber = NY, Gray = Asian/off-hours. Uses pivot bar time, not current bar. Session hours configurable in UTC.
- Confluence Tags: sweeps near PDH/PDL/PWH/PWL are automatically tagged (e.g., SWP-A+PDH). Multi-confluence sweeps near 2+ key levels trigger a dedicated alert.
- Nearest Liquidity: dashboard now shows the nearest bullish and bearish liquidity levels relative to current price.
- Zone Cap: configurable maximum active zones per side (default 25). Oldest removed when exceeded. Prevents object clutter on lower timeframes.
Alerts:
- 7 alert conditions: New EQH, New EQL, Bearish Sweep, Bullish Sweep, Bearish Break, Bullish Break, Multi-Confluence Zone Sweep.
Note: Pivot zones confirm after the configured rightBars candles by design. This is structural confirmation, not repainting.
Credits: EQH/EQL pivot comparison method built on top of AlgoAlpha's original pattern. All new features by EmpArchitect.
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.