OPEN-SOURCE SCRIPT
Liquidity Sweeps [SB1]

Liquidity Sweeps [LuxAlgo Modified]
This indicator detects liquidity sweep events where price briefly breaks above or below recent swing points before reversing. These sweeps often occur during stop hunts, fakeouts, or liquidity grabs, and are commonly used by smart money traders to trap breakout participants before reversing direction.
🔍 What It Does
Identifies key swing highs and lows based on user-defined pivot strength.
Detects:
Bearish Sweeps: Price breaks a recent high but fails to close above it.
Bullish Sweeps: Price breaks a recent low but fails to close below it.
Tracks whether these sweeps are simply wicks, full breakouts and retests, or a combination of both.
Highlights these zones with boxes and labels to signal high-probability reversal or reaction zones.
🧠 Why Use It
Liquidity sweeps are often used by institutions and large players to trigger stops and create movement. Detecting these events helps traders:
Avoid chasing false breakouts
Time entries around exhaustion or reversal points
Align trades with Smart Money Concepts (SMC), ICT principles, or Order Block Theory
Avoid chasing false breakouts
Time entries around exhaustion or reversal points
Align trades with Smart Money Concepts (SMC), ICT principles, or Order Block Theory
⚙️ Settings & Customization
Swings: Adjusts the sensitivity of swing high/low detection.
Detection Type:
Only Wicks: Detects when a wick pierces a level but closes back inside.
Only Outbreaks & Retests: Detects when a candle breaks out and later retests.
Wicks + Outbreaks & Retests: Shows both types for full coverage.
Extend Zones: Draws boxes across future bars until invalidation.
Colors: Fully customizable for bullish and bearish sweeps.
🧬 Original Enhancements
This script is based on open-source work by LuxAlgo and has been significantly enhanced with:
Multiple detection modes
Real-time alert support📣 📣
Efficient pivot memory cleanup📣 📣
Sweep zone auto-extension until broken
Improved visual clarity with dotted/dashed lines, and color-coded boxes
✅ Note: The original version had no alerts. This version adds real-time detection alerts for practical trading use. Credit: Original swing detection logic inspired by LuxAlgo’s open-source Liquidity Sweep framework. This version is extended and modified under the terms of the CC BY-NC-SA 4.0 license.
📣 📣 Alerts Included📣📣
🔼 Bullish Wick Sweep📣
🔽 Bearish Wick Sweep📣
These alerts allow traders to be notified the moment a liquidity sweep occurs, providing immediate edge for reactive or anticipatory trading.
📈 How to Use It
Add to your chart.
Choose the detection type based on your trading style:
Wicks for reversals and stop hunts
Outbreaks for failed breakouts or retests
Wait for sweep zones to form and monitor price behavior around them.
Use in conjunction with:
Fair Value Gaps (FVG)
Order Blocks
VWAP Anchors
Market Structure Breaks
This indicator detects liquidity sweep events where price briefly breaks above or below recent swing points before reversing. These sweeps often occur during stop hunts, fakeouts, or liquidity grabs, and are commonly used by smart money traders to trap breakout participants before reversing direction.
🔍 What It Does
Identifies key swing highs and lows based on user-defined pivot strength.
Detects:
Bearish Sweeps: Price breaks a recent high but fails to close above it.
Bullish Sweeps: Price breaks a recent low but fails to close below it.
Tracks whether these sweeps are simply wicks, full breakouts and retests, or a combination of both.
Highlights these zones with boxes and labels to signal high-probability reversal or reaction zones.
🧠 Why Use It
Liquidity sweeps are often used by institutions and large players to trigger stops and create movement. Detecting these events helps traders:
Avoid chasing false breakouts
Time entries around exhaustion or reversal points
Align trades with Smart Money Concepts (SMC), ICT principles, or Order Block Theory
Avoid chasing false breakouts
Time entries around exhaustion or reversal points
Align trades with Smart Money Concepts (SMC), ICT principles, or Order Block Theory
⚙️ Settings & Customization
Swings: Adjusts the sensitivity of swing high/low detection.
Detection Type:
Only Wicks: Detects when a wick pierces a level but closes back inside.
Only Outbreaks & Retests: Detects when a candle breaks out and later retests.
Wicks + Outbreaks & Retests: Shows both types for full coverage.
Extend Zones: Draws boxes across future bars until invalidation.
Colors: Fully customizable for bullish and bearish sweeps.
🧬 Original Enhancements
This script is based on open-source work by LuxAlgo and has been significantly enhanced with:
Multiple detection modes
Real-time alert support📣 📣
Efficient pivot memory cleanup📣 📣
Sweep zone auto-extension until broken
Improved visual clarity with dotted/dashed lines, and color-coded boxes
✅ Note: The original version had no alerts. This version adds real-time detection alerts for practical trading use. Credit: Original swing detection logic inspired by LuxAlgo’s open-source Liquidity Sweep framework. This version is extended and modified under the terms of the CC BY-NC-SA 4.0 license.
📣 📣 Alerts Included📣📣
🔼 Bullish Wick Sweep📣
🔽 Bearish Wick Sweep📣
These alerts allow traders to be notified the moment a liquidity sweep occurs, providing immediate edge for reactive or anticipatory trading.
📈 How to Use It
Add to your chart.
Choose the detection type based on your trading style:
Wicks for reversals and stop hunts
Outbreaks for failed breakouts or retests
Wait for sweep zones to form and monitor price behavior around them.
Use in conjunction with:
Fair Value Gaps (FVG)
Order Blocks
VWAP Anchors
Market Structure Breaks
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.