OPEN-SOURCE SCRIPT
Liquidity Sweep Detector

Liquidity Sweep Detector is a price-action based indicator designed to identify potential liquidity sweeps around recent highs and lows and highlight subsequent directional confirmation.
The indicator focuses on a simple market behavior: price may temporarily move beyond a recent high or low, take available liquidity, and then return inside the previous range. After detecting this event, the indicator monitors the following candles for confirmation of a potential directional move.
## How It Works
The indicator calculates recent highs and lows using a configurable lookback period.
A bullish liquidity sweep is identified when price moves below a recent low and then closes back above that level.
A bearish liquidity sweep is identified when price moves above a recent high and then closes back below that level.
After a sweep occurs, the indicator monitors a configurable number of candles for directional confirmation. A bullish confirmation requires price to move above the previous candle's high, while a bearish confirmation requires price to move below the previous candle's low.
## Main Features
• Recent liquidity high and low levels
• Bullish liquidity sweep detection
• Bearish liquidity sweep detection
• Sweep zones for visual reference
• Directional confirmation signals
• Configurable confirmation window
• Optional candle-body confirmation
• BUY and SELL markers
• Alert conditions for sweep and confirmation events
• Adjustable visual settings
## Settings
Liquidity Lookback controls how many previous candles are used to identify recent highs and lows.
Confirmation Window controls how many candles the indicator monitors after a liquidity sweep.
Minimum Sweep Wick controls the minimum relative wick size required for a sweep to qualify.
Strong Candle Body can be enabled to require stronger directional candle confirmation.
Visual settings allow users to display or hide liquidity levels, sweep labels, sweep zones, and confirmation markers.
## How to Use
The indicator is intended to help traders study price behavior around recent liquidity levels.
A typical bullish sequence is:
Recent Low → Liquidity Sweep → Reclaim → Bullish Confirmation
A typical bearish sequence is:
Recent High → Liquidity Sweep → Rejection → Bearish Confirmation
Users can combine these observations with their own market analysis, timeframe context, and risk-management approach.
## Limitations
Liquidity sweeps can occur without producing a sustained directional move. A confirmed signal does not guarantee a particular market outcome.
The indicator is based on historical price data and should be treated as an analytical tool rather than a prediction system. Market conditions can change rapidly, and users should independently evaluate each setup.
This script does not guarantee profits, accuracy, or future performance.
## Originality
The indicator combines recent liquidity-level detection, sweep recognition, configurable confirmation logic, and visual sweep zones into a focused price-action tool. Its purpose is to provide a clear framework for observing liquidity events and subsequent price behavior without relying on excessive chart elements.
This publication is intended for educational and analytical purposes and is not financial advice.
The indicator focuses on a simple market behavior: price may temporarily move beyond a recent high or low, take available liquidity, and then return inside the previous range. After detecting this event, the indicator monitors the following candles for confirmation of a potential directional move.
## How It Works
The indicator calculates recent highs and lows using a configurable lookback period.
A bullish liquidity sweep is identified when price moves below a recent low and then closes back above that level.
A bearish liquidity sweep is identified when price moves above a recent high and then closes back below that level.
After a sweep occurs, the indicator monitors a configurable number of candles for directional confirmation. A bullish confirmation requires price to move above the previous candle's high, while a bearish confirmation requires price to move below the previous candle's low.
## Main Features
• Recent liquidity high and low levels
• Bullish liquidity sweep detection
• Bearish liquidity sweep detection
• Sweep zones for visual reference
• Directional confirmation signals
• Configurable confirmation window
• Optional candle-body confirmation
• BUY and SELL markers
• Alert conditions for sweep and confirmation events
• Adjustable visual settings
## Settings
Liquidity Lookback controls how many previous candles are used to identify recent highs and lows.
Confirmation Window controls how many candles the indicator monitors after a liquidity sweep.
Minimum Sweep Wick controls the minimum relative wick size required for a sweep to qualify.
Strong Candle Body can be enabled to require stronger directional candle confirmation.
Visual settings allow users to display or hide liquidity levels, sweep labels, sweep zones, and confirmation markers.
## How to Use
The indicator is intended to help traders study price behavior around recent liquidity levels.
A typical bullish sequence is:
Recent Low → Liquidity Sweep → Reclaim → Bullish Confirmation
A typical bearish sequence is:
Recent High → Liquidity Sweep → Rejection → Bearish Confirmation
Users can combine these observations with their own market analysis, timeframe context, and risk-management approach.
## Limitations
Liquidity sweeps can occur without producing a sustained directional move. A confirmed signal does not guarantee a particular market outcome.
The indicator is based on historical price data and should be treated as an analytical tool rather than a prediction system. Market conditions can change rapidly, and users should independently evaluate each setup.
This script does not guarantee profits, accuracy, or future performance.
## Originality
The indicator combines recent liquidity-level detection, sweep recognition, configurable confirmation logic, and visual sweep zones into a focused price-action tool. Its purpose is to provide a clear framework for observing liquidity events and subsequent price behavior without relying on excessive chart elements.
This publication is intended for educational and analytical purposes and is not financial advice.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
XAU_EMPIRE 👑
Gold & Crypto Analysis
⚡ Setups | 🎓 Education | 🔒 Risk First
Join The Empire On Telegram t.me/+4fY6Svl4L_tmN2E0
Gold & Crypto Analysis
⚡ Setups | 🎓 Education | 🔒 Risk First
Join The Empire On Telegram t.me/+4fY6Svl4L_tmN2E0
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
XAU_EMPIRE 👑
Gold & Crypto Analysis
⚡ Setups | 🎓 Education | 🔒 Risk First
Join The Empire On Telegram t.me/+4fY6Svl4L_tmN2E0
Gold & Crypto Analysis
⚡ Setups | 🎓 Education | 🔒 Risk First
Join The Empire On Telegram t.me/+4fY6Svl4L_tmN2E0
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.