OPEN-SOURCE SCRIPT

Liquidity Sweep Ledger [EmpArchitect]

515
█ OVERVIEW

Liquidity Sweep Ledger [EmpArchitect] maps buy-side and sell-side liquidity levels, then tracks what happened after those levels were swept.

Most liquidity tools mark the sweep and stop there.

This script keeps a simple ledger:

• Liquidity level active
• BSL / SSL swept
• Reclaimed or not reclaimed
• Displacement after sweep
• Structure shift after sweep
• No follow-through
• Dual sweep / ambiguous sweep

It is a structure-context tool. It does not provide entries, stop losses, targets, risk/reward, probability scores, or trade signals.

█ WHAT IT MAPS

Buy-side liquidity — BSL:

A level above price formed from confirmed swing highs, equal-high clusters, previous day high, or previous week high.

Sell-side liquidity — SSL:

A level below price formed from confirmed swing lows, equal-low clusters, previous day low, or previous week low.

When price sweeps one or more levels, the script records the sweep and tracks its lifecycle.

█ HOW IT WORKS

The script uses confirmed pivots only. A swing high or swing low becomes an active liquidity level only after the pivot is confirmed.

Sweep detection uses an ATR-scaled penetration buffer. Price must trade beyond the liquidity level by the selected minimum threshold before the level is marked as swept.

If several same-side levels are swept on one candle, the script aggregates them into one event, such as BSL swept x2 or SSL swept x3.

After a sweep, the script tracks whether price reclaims the level within the selected reclaim window.

For post-sweep response, the script checks for directional displacement using body size relative to ATR and body size relative to candle range.

For structure shift, the script freezes the latest confirmed opposite-side internal pivot at the time of the sweep and then checks whether price closes beyond that reference later.

Same-candle or sequential two-sided sweeps are marked as dual / ambiguous instead of being treated as directional events.

█ SWEEP LIFECYCLE

The script separates the sweep from the response.

A sweep can become:

• Pending reclaim
• Reclaimed
• Taken / no reclaim
• Displaced
• Structure shifted
• No follow-through
• Dual sweep / ambiguous

This matters because not every liquidity sweep produces the same response. Some levels are swept and reclaimed. Some are taken without reclaim. Some lead to displacement. Some produce no follow-through.

The script records the state instead of forcing a directional interpretation.

█ LIQUIDITY SOURCES

Included sources:

• Swing high / swing low liquidity
• Equal-high / equal-low clustering
• Previous day high / previous day low
• Previous week high / previous week low

Default source settings:

• Swing liquidity: ON
• Equal-high / equal-low clustering: ON
• Previous day high/low: ON
• Previous week high/low: OFF

Previous week high/low is included but disabled by default. Review it on your market/timeframe before enabling it.

█ DASHBOARD AND LEDGER

The dashboard shows the current liquidity-sweep ledger:

• Last sweep
• Source
• Reclaim state
• Response state
• Age
• Active BSL count
• Active SSL count
• Compact last-sweeps ledger

The ledger is the main feature. It helps review what happened after liquidity was taken.

Response detail is recorded in the ledger and dashboard. On-chart response labels are optional and are off by default to keep the chart clean.

█ ALERTS

Included context alerts:

• BSL swept
• SSL swept
• Dual sweep
• Reclaimed
• Displaced
• Structure shift
• Taken / no reclaim
• No follow-through

Alerts are structure-context alerts only. They are not trade signals.

█ TESTING NOTES

Tested during development on BTCUSDT 1H and XAUUSD 1H.

Other markets and timeframes may require adjustment of pivot length, ATR penetration, reclaim window, and response settings.

█ PAIRS WITH

Smart Liquidity Map [EmpArchitect] — broader liquidity map: EQH/EQL zones, PDH/PDL, and PWH/PWL reference levels.

Liquidity Sweep Ledger focuses on the next step: once liquidity is swept, did price reclaim, displace, shift structure, or fail to follow through?


█ IMPORTANT LIMITATIONS

• A liquidity sweep is not a trade entry.
• A reclaim is not a trade signal.
• Displacement does not guarantee continuation.
• Structure shift is a mapped event, not a recommendation.
• Results depend on pivot length, ATR settings, market, and timeframe.
• The script is designed for chart review, not automated trading.

█ NOTES

• Pine Script v6
• Public and open-source
• Built by EmpArchitect
• Educational structure-context tool only
• Not financial advice
• Not a signal service

█ CORE IDEA

Liquidity Sweep Ledger maps liquidity sweeps and tracks whether price reclaimed, displaced, shifted structure, or produced no follow-through.

It gives the map.
The trader makes the decision.

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.