OPEN-SOURCE SCRIPT
ICT BSL / SSL Liquidity

ICT BSL / SSL Liquidity is a market-structure based liquidity detection indicator designed to identify Buy Side Liquidity (BSL), Sell Side Liquidity (SSL), and potential liquidity sweeps directly on the chart.
The indicator detects confirmed swing highs and swing lows and converts them into visual liquidity zones. It then monitors these zones for specific sweep conditions, helping traders visually identify situations where price takes liquidity and closes back through the corresponding zone.
BSL zones are created from confirmed swing highs, while SSL zones are created from confirmed swing lows. When a valid sweep occurs, the zone is highlighted and a corresponding bullish or bearish sweep signal is displayed on the chart.
The indicator is designed primarily as a liquidity-analysis tool and can be used alongside price action, market structure, support/resistance, order flow, or other ICT/SMC concepts.
SIGNALS LOGIC:
1. SELL SIDE LIQUIDITY (SSL) — BULLISH SWEEP
• Once triggered, the SSL zone is frozen and highlighted.
• A bullish "B" signal is plotted below the candle.
2. BUY SIDE LIQUIDITY (BSL) — BEARISH SWEEP
• Once triggered, the BSL zone is frozen and highlighted.
• A bearish "S" signal is plotted above the candle.
3. LIQUIDITY ZONE INVALIDATION
A liquidity zone can be removed from active tracking when price breaks the level in the opposite direction according to the script's invalidation logic.
4. CONFIRMED SWING DETECTION
Liquidity levels are generated using confirmed swing highs and swing lows based on the selected Swing Length. Increasing the Swing Length generally produces fewer but more significant liquidity levels.
USER INPUTS:
Indicator Settings
• Swing Length
Determines the number of bars used on each side of a pivot to identify swing highs and swing lows. Higher values generally produce fewer and more significant liquidity levels.
• Candles Lookback
Defines the lookback window used when checking whether price has wicked through a liquidity level and reclaimed it.
• Maximum Active BSL Zones
Controls the maximum number of Buy Side Liquidity zones that remain actively tracked.
• Maximum Active SSL Zones
Controls the maximum number of Sell Side Liquidity zones that remain actively tracked.
Visual Settings
• Zone Gradient Bands
Controls the number of gradient bands used to render each liquidity zone. More bands create a smoother visual effect.
• Glow On Swept Level
Adds a visual glow around a liquidity level when it is swept.
• Color The Sweep Candle
Highlights the candle responsible for the detected liquidity sweep.
Color Settings
• Palette Theme
Choose between:
* Neon
* Muted
* Native
* Custom
• BSL Color
Custom color for Buy Side Liquidity when the Custom palette is selected.
• SSL Color
Custom color for Sell Side Liquidity when the Custom palette is selected.
WHY IT IS UNIQUE:
• Separates Buy Side Liquidity and Sell Side Liquidity into dedicated active zones.
• Uses confirmed swing points rather than simply marking every recent high or low.
• Combines liquidity levels with zone-based visualization instead of displaying only horizontal lines.
• Automatically extends active liquidity zones until they are swept or invalidated.
• Clearly distinguishes bullish SSL sweeps from bearish BSL sweeps.
• Uses gradient zone rendering to make liquidity areas easier to identify visually.
• Provides an optional glow effect when liquidity is swept.
• Only the sweep candle is highlighted, keeping the rest of the chart visually clean.
• Includes configurable limits for active BSL and SSL zones to help manage chart clutter and drawing-object usage.
• Built-in alert conditions are available for both bullish SSL sweeps and bearish BSL sweeps.
HOW USER CAN BENEFIT FROM IT:
This indicator can help traders:
• Identify areas where liquidity may be resting above swing highs or below swing lows.
• Spot potential liquidity sweeps and rejection behavior more easily.
• Visually track active liquidity zones as price develops.
• Separate bullish SSL sweep events from bearish BSL sweep events.
• Use liquidity sweeps as an additional confirmation within an existing trading strategy.
• Combine liquidity information with market structure, trend analysis, support/resistance, FVGs, order blocks, or other ICT/SMC concepts.
• Create TradingView alerts for detected liquidity sweep events.
• Reduce manual chart marking by automatically detecting and managing liquidity zones.
IMPORTANT:
This indicator identifies liquidity and sweep conditions based on the rules implemented in the script. A liquidity sweep signal should not automatically be treated as a guaranteed buy or sell signal. Traders should use proper risk management and combine the indicator with their own market analysis and trading methodology.
The script is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice.
The indicator detects confirmed swing highs and swing lows and converts them into visual liquidity zones. It then monitors these zones for specific sweep conditions, helping traders visually identify situations where price takes liquidity and closes back through the corresponding zone.
BSL zones are created from confirmed swing highs, while SSL zones are created from confirmed swing lows. When a valid sweep occurs, the zone is highlighted and a corresponding bullish or bearish sweep signal is displayed on the chart.
The indicator is designed primarily as a liquidity-analysis tool and can be used alongside price action, market structure, support/resistance, order flow, or other ICT/SMC concepts.
SIGNALS LOGIC:
1. SELL SIDE LIQUIDITY (SSL) — BULLISH SWEEP
- SSL is created from a confirmed swing low.
- The indicator tracks the liquidity level and its associated zone.
- A bullish SSL sweep is detected when:
- Price trades below the SSL level.
- The lookback-period low moves below the liquidity level.
- The candle closes above the zone body.
- The sweep candle closes bullish.
• Once triggered, the SSL zone is frozen and highlighted.
• A bullish "B" signal is plotted below the candle.
2. BUY SIDE LIQUIDITY (BSL) — BEARISH SWEEP
- BSL is created from a confirmed swing high.
- The indicator tracks the liquidity level and its associated zone.
- A bearish BSL sweep is detected when:
- Price trades above the BSL level.
- The lookback-period high moves above the liquidity level.
- The candle closes below the zone body.
- The sweep candle closes bearish.
• Once triggered, the BSL zone is frozen and highlighted.
• A bearish "S" signal is plotted above the candle.
3. LIQUIDITY ZONE INVALIDATION
A liquidity zone can be removed from active tracking when price breaks the level in the opposite direction according to the script's invalidation logic.
4. CONFIRMED SWING DETECTION
Liquidity levels are generated using confirmed swing highs and swing lows based on the selected Swing Length. Increasing the Swing Length generally produces fewer but more significant liquidity levels.
USER INPUTS:
Indicator Settings
• Swing Length
Determines the number of bars used on each side of a pivot to identify swing highs and swing lows. Higher values generally produce fewer and more significant liquidity levels.
• Candles Lookback
Defines the lookback window used when checking whether price has wicked through a liquidity level and reclaimed it.
• Maximum Active BSL Zones
Controls the maximum number of Buy Side Liquidity zones that remain actively tracked.
• Maximum Active SSL Zones
Controls the maximum number of Sell Side Liquidity zones that remain actively tracked.
Visual Settings
• Zone Gradient Bands
Controls the number of gradient bands used to render each liquidity zone. More bands create a smoother visual effect.
• Glow On Swept Level
Adds a visual glow around a liquidity level when it is swept.
• Color The Sweep Candle
Highlights the candle responsible for the detected liquidity sweep.
Color Settings
• Palette Theme
Choose between:
* Neon
* Muted
* Native
* Custom
• BSL Color
Custom color for Buy Side Liquidity when the Custom palette is selected.
• SSL Color
Custom color for Sell Side Liquidity when the Custom palette is selected.
WHY IT IS UNIQUE:
• Separates Buy Side Liquidity and Sell Side Liquidity into dedicated active zones.
• Uses confirmed swing points rather than simply marking every recent high or low.
• Combines liquidity levels with zone-based visualization instead of displaying only horizontal lines.
• Automatically extends active liquidity zones until they are swept or invalidated.
• Clearly distinguishes bullish SSL sweeps from bearish BSL sweeps.
• Uses gradient zone rendering to make liquidity areas easier to identify visually.
• Provides an optional glow effect when liquidity is swept.
• Only the sweep candle is highlighted, keeping the rest of the chart visually clean.
• Includes configurable limits for active BSL and SSL zones to help manage chart clutter and drawing-object usage.
• Built-in alert conditions are available for both bullish SSL sweeps and bearish BSL sweeps.
HOW USER CAN BENEFIT FROM IT:
This indicator can help traders:
• Identify areas where liquidity may be resting above swing highs or below swing lows.
• Spot potential liquidity sweeps and rejection behavior more easily.
• Visually track active liquidity zones as price develops.
• Separate bullish SSL sweep events from bearish BSL sweep events.
• Use liquidity sweeps as an additional confirmation within an existing trading strategy.
• Combine liquidity information with market structure, trend analysis, support/resistance, FVGs, order blocks, or other ICT/SMC concepts.
• Create TradingView alerts for detected liquidity sweep events.
• Reduce manual chart marking by automatically detecting and managing liquidity zones.
IMPORTANT:
This indicator identifies liquidity and sweep conditions based on the rules implemented in the script. A liquidity sweep signal should not automatically be treated as a guaranteed buy or sell signal. Traders should use proper risk management and combine the indicator with their own market analysis and trading methodology.
The script is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Shivam mandai
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
Shivam mandai
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.