OPEN-SOURCE SCRIPT
Advanced Liquidity Sweep [HexaTrades]

Advanced Liquidity Sweep is a Smart Money Concepts (SMC) indicator designed to automatically identify liquidity pools, equal highs and lows, liquidity sweeps, and potential reversal areas. Rather than simply detecting wick breaks, it evaluates each sweep using multiple confirmation factors and assigns a strength score, helping traders distinguish between minor stop hunts and higher-quality liquidity events.
The indicator is designed for cryptocurrencies, stocks, forex, futures, commodities, and indices across all timeframes.
What is Liquidity?
Financial markets constantly search for liquidity before making significant moves.
Retail traders often place:
• Stop losses below swing lows
• Stop losses above swing highs
• Breakout orders above resistance
• Breakdown orders below support
These orders accumulate into liquidity pools. Large market participants frequently move prices into these areas to fill large positions before reversing or continuing the trend.
This indicator automatically identifies those liquidity pools and highlights when they are swept.
How it works :
- Map the liquidity.: Confirmed pivot highs become BSL lines, pivot lows become SSL lines. You choose Major and/or Minor swing sizes.
- Cluster equal highs/lows. Several highs (or lows) at nearly the same price form an EQH / EQL cluster, a bigger, juicier liquidity pool that scores higher.
- Detect the sweep (on closed candles only).
• Bearish: price trades above a BSL level but closes back below it.
• Bullish: price trades below an SSL level but closes back above it.
- Score it 0–100. Six factors rate how convincing the rejection was (see below). At/above your Strong threshold, it’s tagged STRONG.
- Draw a sweep zone. Optionally turn each sweep into a supply/demand zone you can watch for re-entry, with optional auto-expiry.
- Filter the noise. Optional Trend, Higher-Timeframe and Filter presets keep only the cleaner grabs.
Features
🔶 Major & Minor Swing Detection
The indicator detects both major and minor swing highs and lows.
Major swings represent stronger institutional liquidity and usually produce higher-quality reactions.
Minor swings identify shorter-term liquidity that is commonly targeted during intraday trading.
Users can monitor:
• Major swings only
• Minor swings only
• Both simultaneously
🔶Buy-Side Liquidity (BSL)
Buy-side liquidity forms above previous swing highs.
These areas usually contain:
• Short stop losses
• Breakout buy orders
• Momentum entries
When price trades above these highs before quickly closing back below, the indicator identifies a bearish liquidity sweep.
🔶 Sell-Side Liquidity (SSL)
Sell-side liquidity forms below previous swing lows.
These areas usually contain:
• Long stop losses
• Panic selling
• Breakdown entries
When price trades below these lows before closing back above, the indicator identifies a bullish liquidity sweep.
🔶 Equal Highs & Equal Lows
Equal highs and equal lows are some of the strongest liquidity pools because many traders place stops at nearly identical price levels.
The indicator automatically detects these structures using:
• ATR-based tolerance
• Percentage-based tolerance
Equal liquidity levels are highlighted separately and tracked independently from normal swing liquidity.
🔶 Zone Colors
Here are the zone and line colors used in this indicator and what each one means:
🔴 Red: Buy-Side Liquidity (BSL)
- Represents swing highs where buy-side liquidity is concentrated.
- Commonly contains short stop-loss orders and breakout buy orders.
- These are active, unswept liquidity levels and potential targets for a bearish liquidity sweep.
🟢 Green: Sell-Side Liquidity (SSL)
- Represents swing lows where sell-side liquidity is concentrated.
- Commonly contains long stop-loss orders and breakdown sell orders.
- These are active, unswept liquidity levels and potential targets for a bullish liquidity sweep.
🟠 Orange: Equal Highs / Equal Lows (EQH / EQL)
- Marks two or more highs or lows formed at nearly the same price.
- These levels are displayed using dashed lines and often contain larger clusters of resting liquidity.
- Sweeps of Equal Highs and Equal Lows typically produce stronger, higher-probability trading opportunities.
⚪ Gray: Swept (Inactive) Liquidity
- Indicates liquidity that has already been swept by price.
- Once a level has been taken, it changes to gray and becomes inactive.
- This helps distinguish spent liquidity from active levels that may still attract future price movement.
Sweep Signal Colors
🟩 Bullish Liquidity Sweep
-Appears when Sell-Side Liquidity (SSL) or an Equal Low (EQL) is swept.
-Price trades below the liquidity level but closes back above it, confirming a bullish liquidity sweep.
🟪 Bearish Liquidity Sweep
- Appears when Buy-Side Liquidity (BSL) or an Equal High (EQH ) is swept.
- Price trades above the liquidity level but closes back below it, confirming a bearish liquidity sweep.
🔶 Liquidity Sweep Detection
A liquidity sweep occurs when price temporarily breaks a liquidity level but fails to hold beyond it.
For a valid sweep:
Bearish Sweep
• Price trades above Buy-Side Liquidity
• The candle closes back below the level
Bullish Sweep
• Price trades below Sell-Side Liquidity
• The candle closes back above the level
Because the signal is generated only after the candle closes, the indicator does not repaint.
🔶Sweep Strength Score
Every sweep receives a strength score from 0 to 100.
The score combines multiple factors including:
• Wick rejection
• Candle body strength
• Penetration distance beyond liquidity
• Volume confirmation
• Distance from the EMA
• Equal High / Equal Low cluster strength
Higher scores generally indicate stronger liquidity events.
Strength tiers are classified as: Weak, Medium, Strong, and Elite
Users can also define a minimum score to filter out lower-quality sweeps.
🔶 Score Presets
Three scoring profiles are available:
Conservative: Places greater emphasis on clean rejection candles and body structure.
Balanced: Provides an even weighting across all scoring components and is suitable for most trading styles.
Aggressive: Places greater importance on volume and equal liquidity clusters, making it more responsive to institutional activity.
🔶 Trend & Higher Timeframe Filters
The indicator includes optional trend confirmation filters to help improve signal quality.
The Trend Filter uses the EMA 50 and EMA 200 to evaluate the current market direction and offers two modes:
Continuation : Displays only sweeps that align with the prevailing trend.
Reversal : Displays only sweeps that occur against the prevailing trend, helping identify potential market reversals.
For additional confirmation, the Higher Timeframe (HTF) Bias Filter compares price with a higher timeframe EMA. When enabled, sweeps are generated only if they align with the broader market trend, helping reduce false signals and improving overall trade selection.
🔶 Liquidity & Sweep Zones
The indicator provides two complementary ways to visualize liquidity on the chart.
Liquidity Zones highlight swing highs and lows as either horizontal lines, price zones, or both, making it easier to identify areas where liquidity is likely to accumulate. Users can choose between Lines Only, Zones Only, or Both to match their preferred chart style.
When a liquidity sweep occurs, the indicator automatically creates a Sweep Zone around the rejection candle. These zones can be extended into the future, automatically removed after a user-defined period, or kept indefinitely. Sweep zones often serve as potential support or resistance areas, making them useful for identifying future reaction zones, retests, and trade opportunities.
⭐️ Bullish Liquidity Sweep
Price sweeps below the Sell-Side Liquidity (SSL), triggering stop-loss orders before quickly reversing and closing back above the liquidity level. The Sweep Zone acts as a potential support area, while the strength score helps evaluate the quality of the setup. Traders may look for long opportunities on the confirmation or retest, targeting the next Buy-Side Liquidity (BSL).
Example:

⭐️Bearish Liquidity Sweep
Price sweeps above Buy-Side Liquidity (BSL), triggering breakout orders and stop-losses before reversing and closing back below the liquidity level. The Sweep Zone acts as a potential resistance area, while the strength score helps evaluate the quality of the setup. Traders may look for short opportunities on the rejection or retest, targeting the next Sell-Side Liquidity (SSL
example chart:

Alerts
Built-in alert conditions include:
• Bullish Liquidity Sweep
• Bearish Liquidity Sweep
• Equal High Sweep
• Equal Low Sweep
• Strong Bullish Sweep
• Strong Bearish Sweep
• Next-Candle Confirmed Sweep
• Any Liquidity Sweep
These alerts allow traders to automate notifications without monitoring charts continuously.
How to Use
The Advanced Liquidity Sweep indicator helps identify where liquidity exists, when it has been swept, and how strong the resulting market reaction is. For the best results, combine it with market structure, support and resistance, and proper risk management.
Bullish Setup:
- Wait for price to sweep a Sell-Side Liquidity (SSL) level.
- The candle should close back above the liquidity level, confirming a bullish sweep.
- Prefer Medium, Strong, or Elite sweep scores for higher-quality setups.
- Use the Trend Filter or Higher Timeframe Bias Filter for additional confirmation.
- Watch for a retest of the Sweep Zone before considering a long entry.
-Place the stop-loss below the sweep low and target nearby resistance or Buy-Side Liquidity.
Bearish Setup:
- Wait for price to sweep a Buy-Side Liquidity (BSL) level.
- The candle should close back below the liquidity level, confirming a bearish sweep.
- Focus on higher-strength sweep scores for better probability.
- Confirm the setup using the Trend or Higher Timeframe filters.
- Look for rejection from the Sweep Zone before entering a short position.
- Place the stop-loss above the sweep high and target nearby support or Sell-Side Liquidity.
Advanced Liquidity Sweep is designed to help traders understand where liquidity exists, identify when it has been taken, and evaluate the quality of each sweep using multiple confirmation factors. Rather than relying on simple wick breaks, it combines liquidity analysis, market structure, trend confirmation, and strength scoring to provide greater context for trading decisions. As with any technical tool, it should be used alongside sound risk management and additional market analysis for the best results.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
This indicator is for educational and analytical purposes only. It should not be considered financial advice. Always use proper risk management and make trading decisions based on your own analysis
The indicator is designed for cryptocurrencies, stocks, forex, futures, commodities, and indices across all timeframes.
What is Liquidity?
Financial markets constantly search for liquidity before making significant moves.
Retail traders often place:
• Stop losses below swing lows
• Stop losses above swing highs
• Breakout orders above resistance
• Breakdown orders below support
These orders accumulate into liquidity pools. Large market participants frequently move prices into these areas to fill large positions before reversing or continuing the trend.
This indicator automatically identifies those liquidity pools and highlights when they are swept.
How it works :
- Map the liquidity.: Confirmed pivot highs become BSL lines, pivot lows become SSL lines. You choose Major and/or Minor swing sizes.
- Cluster equal highs/lows. Several highs (or lows) at nearly the same price form an EQH / EQL cluster, a bigger, juicier liquidity pool that scores higher.
- Detect the sweep (on closed candles only).
• Bearish: price trades above a BSL level but closes back below it.
• Bullish: price trades below an SSL level but closes back above it.
- Score it 0–100. Six factors rate how convincing the rejection was (see below). At/above your Strong threshold, it’s tagged STRONG.
- Draw a sweep zone. Optionally turn each sweep into a supply/demand zone you can watch for re-entry, with optional auto-expiry.
- Filter the noise. Optional Trend, Higher-Timeframe and Filter presets keep only the cleaner grabs.
Features
🔶 Major & Minor Swing Detection
The indicator detects both major and minor swing highs and lows.
Major swings represent stronger institutional liquidity and usually produce higher-quality reactions.
Minor swings identify shorter-term liquidity that is commonly targeted during intraday trading.
Users can monitor:
• Major swings only
• Minor swings only
• Both simultaneously
🔶Buy-Side Liquidity (BSL)
Buy-side liquidity forms above previous swing highs.
These areas usually contain:
• Short stop losses
• Breakout buy orders
• Momentum entries
When price trades above these highs before quickly closing back below, the indicator identifies a bearish liquidity sweep.
🔶 Sell-Side Liquidity (SSL)
Sell-side liquidity forms below previous swing lows.
These areas usually contain:
• Long stop losses
• Panic selling
• Breakdown entries
When price trades below these lows before closing back above, the indicator identifies a bullish liquidity sweep.
🔶 Equal Highs & Equal Lows
Equal highs and equal lows are some of the strongest liquidity pools because many traders place stops at nearly identical price levels.
The indicator automatically detects these structures using:
• ATR-based tolerance
• Percentage-based tolerance
Equal liquidity levels are highlighted separately and tracked independently from normal swing liquidity.
🔶 Zone Colors
Here are the zone and line colors used in this indicator and what each one means:
🔴 Red: Buy-Side Liquidity (BSL)
- Represents swing highs where buy-side liquidity is concentrated.
- Commonly contains short stop-loss orders and breakout buy orders.
- These are active, unswept liquidity levels and potential targets for a bearish liquidity sweep.
🟢 Green: Sell-Side Liquidity (SSL)
- Represents swing lows where sell-side liquidity is concentrated.
- Commonly contains long stop-loss orders and breakdown sell orders.
- These are active, unswept liquidity levels and potential targets for a bullish liquidity sweep.
🟠 Orange: Equal Highs / Equal Lows (EQH / EQL)
- Marks two or more highs or lows formed at nearly the same price.
- These levels are displayed using dashed lines and often contain larger clusters of resting liquidity.
- Sweeps of Equal Highs and Equal Lows typically produce stronger, higher-probability trading opportunities.
⚪ Gray: Swept (Inactive) Liquidity
- Indicates liquidity that has already been swept by price.
- Once a level has been taken, it changes to gray and becomes inactive.
- This helps distinguish spent liquidity from active levels that may still attract future price movement.
Sweep Signal Colors
🟩 Bullish Liquidity Sweep
-Appears when Sell-Side Liquidity (SSL) or an Equal Low (EQL) is swept.
-Price trades below the liquidity level but closes back above it, confirming a bullish liquidity sweep.
🟪 Bearish Liquidity Sweep
- Appears when Buy-Side Liquidity (BSL) or an Equal High (EQH ) is swept.
- Price trades above the liquidity level but closes back below it, confirming a bearish liquidity sweep.
🔶 Liquidity Sweep Detection
A liquidity sweep occurs when price temporarily breaks a liquidity level but fails to hold beyond it.
For a valid sweep:
Bearish Sweep
• Price trades above Buy-Side Liquidity
• The candle closes back below the level
Bullish Sweep
• Price trades below Sell-Side Liquidity
• The candle closes back above the level
Because the signal is generated only after the candle closes, the indicator does not repaint.
🔶Sweep Strength Score
Every sweep receives a strength score from 0 to 100.
The score combines multiple factors including:
• Wick rejection
• Candle body strength
• Penetration distance beyond liquidity
• Volume confirmation
• Distance from the EMA
• Equal High / Equal Low cluster strength
Higher scores generally indicate stronger liquidity events.
Strength tiers are classified as: Weak, Medium, Strong, and Elite
Users can also define a minimum score to filter out lower-quality sweeps.
🔶 Score Presets
Three scoring profiles are available:
Conservative: Places greater emphasis on clean rejection candles and body structure.
Balanced: Provides an even weighting across all scoring components and is suitable for most trading styles.
Aggressive: Places greater importance on volume and equal liquidity clusters, making it more responsive to institutional activity.
🔶 Trend & Higher Timeframe Filters
The indicator includes optional trend confirmation filters to help improve signal quality.
The Trend Filter uses the EMA 50 and EMA 200 to evaluate the current market direction and offers two modes:
Continuation : Displays only sweeps that align with the prevailing trend.
Reversal : Displays only sweeps that occur against the prevailing trend, helping identify potential market reversals.
For additional confirmation, the Higher Timeframe (HTF) Bias Filter compares price with a higher timeframe EMA. When enabled, sweeps are generated only if they align with the broader market trend, helping reduce false signals and improving overall trade selection.
🔶 Liquidity & Sweep Zones
The indicator provides two complementary ways to visualize liquidity on the chart.
Liquidity Zones highlight swing highs and lows as either horizontal lines, price zones, or both, making it easier to identify areas where liquidity is likely to accumulate. Users can choose between Lines Only, Zones Only, or Both to match their preferred chart style.
When a liquidity sweep occurs, the indicator automatically creates a Sweep Zone around the rejection candle. These zones can be extended into the future, automatically removed after a user-defined period, or kept indefinitely. Sweep zones often serve as potential support or resistance areas, making them useful for identifying future reaction zones, retests, and trade opportunities.
⭐️ Bullish Liquidity Sweep
Price sweeps below the Sell-Side Liquidity (SSL), triggering stop-loss orders before quickly reversing and closing back above the liquidity level. The Sweep Zone acts as a potential support area, while the strength score helps evaluate the quality of the setup. Traders may look for long opportunities on the confirmation or retest, targeting the next Buy-Side Liquidity (BSL).
Example:
⭐️Bearish Liquidity Sweep
Price sweeps above Buy-Side Liquidity (BSL), triggering breakout orders and stop-losses before reversing and closing back below the liquidity level. The Sweep Zone acts as a potential resistance area, while the strength score helps evaluate the quality of the setup. Traders may look for short opportunities on the rejection or retest, targeting the next Sell-Side Liquidity (SSL
example chart:
Alerts
Built-in alert conditions include:
• Bullish Liquidity Sweep
• Bearish Liquidity Sweep
• Equal High Sweep
• Equal Low Sweep
• Strong Bullish Sweep
• Strong Bearish Sweep
• Next-Candle Confirmed Sweep
• Any Liquidity Sweep
These alerts allow traders to automate notifications without monitoring charts continuously.
How to Use
The Advanced Liquidity Sweep indicator helps identify where liquidity exists, when it has been swept, and how strong the resulting market reaction is. For the best results, combine it with market structure, support and resistance, and proper risk management.
Bullish Setup:
- Wait for price to sweep a Sell-Side Liquidity (SSL) level.
- The candle should close back above the liquidity level, confirming a bullish sweep.
- Prefer Medium, Strong, or Elite sweep scores for higher-quality setups.
- Use the Trend Filter or Higher Timeframe Bias Filter for additional confirmation.
- Watch for a retest of the Sweep Zone before considering a long entry.
-Place the stop-loss below the sweep low and target nearby resistance or Buy-Side Liquidity.
Bearish Setup:
- Wait for price to sweep a Buy-Side Liquidity (BSL) level.
- The candle should close back below the liquidity level, confirming a bearish sweep.
- Focus on higher-strength sweep scores for better probability.
- Confirm the setup using the Trend or Higher Timeframe filters.
- Look for rejection from the Sweep Zone before entering a short position.
- Place the stop-loss above the sweep high and target nearby support or Sell-Side Liquidity.
Advanced Liquidity Sweep is designed to help traders understand where liquidity exists, identify when it has been taken, and evaluate the quality of each sweep using multiple confirmation factors. Rather than relying on simple wick breaks, it combines liquidity analysis, market structure, trend confirmation, and strength scoring to provide greater context for trading decisions. As with any technical tool, it should be used alongside sound risk management and additional market analysis for the best results.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
This indicator is for educational and analytical purposes only. It should not be considered financial advice. Always use proper risk management and make trading decisions based on your own analysis
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
🚀Telegram : t.me/hexatrades
🌐Website: hexatrades.io/
🗣️Twitter(X): twitter.com/HexaTrades
🌐Website: hexatrades.io/
🗣️Twitter(X): twitter.com/HexaTrades
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
🚀Telegram : t.me/hexatrades
🌐Website: hexatrades.io/
🗣️Twitter(X): twitter.com/HexaTrades
🌐Website: hexatrades.io/
🗣️Twitter(X): twitter.com/HexaTrades
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน