Liquidity Sweeps [Quantum Algo]Liquidity Sweeps is an open-source liquidity sweep indicator that maps resting
liquidity at swing highs and swing lows, then flags the exact moment that liquidity is swept and
rejected — the classic stop-hunt behaviour traders watch for in Smart Money Concepts (SMC).
WHAT IS A LIQUIDITY SWEEP?
A liquidity sweep (also called a liquidity grab or stop hunt) happens when price briefly spikes
beyond an obvious swing high or swing low — where stop-loss and breakout orders rest — and then
closes back inside the prior range. The wick takes the liquidity; the close shows the breakout
failed. Liquidity sitting above swing highs is buy-side liquidity (BSL); liquidity sitting below
swing lows is sell-side liquidity (SSL).
A bearish liquidity sweep occurs when buy-side liquidity above a swing high is swept and price
closes back below it. A bullish liquidity sweep occurs when sell-side liquidity below a swing low
is swept and price closes back above it.
HOW THE INDICATOR WORKS
- It detects confirmed swing highs and swing lows using a configurable pivot strength, and draws a
liquidity level at each one. Buy-side levels sit above price; sell-side levels sit below.
- Each level extends to the right until it is interacted with.
- When a candle wicks through a level but closes back inside, the indicator marks a liquidity
sweep with a label and an optional highlight on the sweeping wick.
- An optional volume filter confirms only sweeps where the sweeping candle trades above its
average volume, filtering out low-conviction wicks.
- If price instead closes fully through a level, that is treated as a clean break (a plain
liquidity grab / breakout), not a sweep, and the level is retired without a signal.
WHAT IT SHOWS
- Mapped buy-side (BSL) and sell-side (SSL) liquidity levels.
- Bullish and bearish liquidity sweep markers, the moment a level is swept and rejected.
- Optional wick highlighting on the sweep candle.
- A dashboard showing bullish/bearish sweep counts, the last sweep direction, and the nearest
un-swept buy-side and sell-side levels with their percentage distance from price.
HOW TO USE IT
Liquidity sweeps are most useful as a timing and context tool, not a standalone buy/sell system.
A common workflow:
- Mark the obvious highs and lows where liquidity is likely resting.
- Wait for a sweep into one of those pools (a wick through, close back inside), ideally with the
volume filter confirming participation.
- Look for confirmation in your own process — a market-structure shift, an order block, a
fair-value-gap fill, or higher-timeframe trend alignment — before acting.
- A bearish sweep above resistance can precede a move down; a bullish sweep below support can
precede a move up. Always define risk beyond the swept extreme.
SETTINGS
- Pivot Strength: how many bars define a swing; higher values keep only major liquidity pools.
- Max Levels per Side: how many recent levels to keep mapped.
- Volume Confirmation: toggle, average length, and multiplier to qualify a sweep.
- Treat Clean Breaks as Grabs: retire levels that are broken through rather than swept.
- Line width, style, and transparency for clear level visibility.
- Full colour controls and a movable dashboard.
ALERTS
Three named alert conditions are included: Bullish Liquidity Sweep, Bearish Liquidity Sweep, and
Any Liquidity Sweep.
DISCLAIMER
For educational purposes only. This is a technical analysis tool, not financial advice, and it does
not predict price. Trading involves risk and you can lose your capital. No indicator is profitable
on its own — always do your own research and use proper risk management.
อินดิเคเตอร์ Pine Script®









