OPEN-SOURCE SCRIPT
stelaraX - BSL/SSL Liquidity

stelaraX – BSL/SSL Liquidity
stelaraX – BSL/SSL Liquidity is a technical analysis indicator that identifies and tracks buy-side and sell-side liquidity levels based on swing highs and swing lows. The script uses pivot detection to mark potential liquidity pools, then monitors price action to highlight when those levels are swept.
The indicator is designed to visualize liquidity as either lines, zones, or both, and to keep the chart clean through configurable level limits and optional extensions.
Core logic
Swing highs and swing lows are detected using ta.pivothigh and ta.pivotlow with a user-defined swing length.
Each detected swing high creates a BSL level, and each detected swing low creates an SSL level.
For every created level, the script stores:
* the price
* the bar index where the swing formed
* sweep status and sweep bar
* optional drawn objects (line, zone box, label)
A level is considered swept when:
* BSL is swept if high trades above the stored swing high price
* SSL is swept if low trades below the stored swing low price
When a sweep occurs, the corresponding visuals are updated to a “swept” style (higher transparency and dashed line), and the level is stopped/closed at the sweep bar.
Display and styling
The indicator supports three display modes:
* Lines: horizontal liquidity lines
* Zones: rectangular zones with adjustable width in percent
* Both: lines and zones together
Additional options:
* extend levels forward by a fixed amount if not swept
* show labels at creation (BSL / SSL)
* optional swept marker at the sweep bar
* customizable colors for active and swept states
* maximum number of levels to keep on chart (older levels are removed automatically)
Dashboard
An optional dashboard summarizes:
* total BSL levels and swept BSL levels
* total SSL levels and swept SSL levels
* sweep rate percentages for both sides
The dashboard position and text size are configurable.
Alerts
The script provides:
* alert conditions for new BSL and SSL levels (new pivot high / new pivot low)
* optional real-time alert messages when a sweep is detected (BSL swept or SSL swept)
Disclaimer
This indicator is intended for technical analysis purposes only and does not provide financial advice or trade recommendations. Trading decisions and risk management remain the responsibility of the user.
stelaraX – BSL/SSL Liquidity is a technical analysis indicator that identifies and tracks buy-side and sell-side liquidity levels based on swing highs and swing lows. The script uses pivot detection to mark potential liquidity pools, then monitors price action to highlight when those levels are swept.
The indicator is designed to visualize liquidity as either lines, zones, or both, and to keep the chart clean through configurable level limits and optional extensions.
Core logic
Swing highs and swing lows are detected using ta.pivothigh and ta.pivotlow with a user-defined swing length.
Each detected swing high creates a BSL level, and each detected swing low creates an SSL level.
For every created level, the script stores:
* the price
* the bar index where the swing formed
* sweep status and sweep bar
* optional drawn objects (line, zone box, label)
A level is considered swept when:
* BSL is swept if high trades above the stored swing high price
* SSL is swept if low trades below the stored swing low price
When a sweep occurs, the corresponding visuals are updated to a “swept” style (higher transparency and dashed line), and the level is stopped/closed at the sweep bar.
Display and styling
The indicator supports three display modes:
* Lines: horizontal liquidity lines
* Zones: rectangular zones with adjustable width in percent
* Both: lines and zones together
Additional options:
* extend levels forward by a fixed amount if not swept
* show labels at creation (BSL / SSL)
* optional swept marker at the sweep bar
* customizable colors for active and swept states
* maximum number of levels to keep on chart (older levels are removed automatically)
Dashboard
An optional dashboard summarizes:
* total BSL levels and swept BSL levels
* total SSL levels and swept SSL levels
* sweep rate percentages for both sides
The dashboard position and text size are configurable.
Alerts
The script provides:
* alert conditions for new BSL and SSL levels (new pivot high / new pivot low)
* optional real-time alert messages when a sweep is detected (BSL swept or SSL swept)
Disclaimer
This indicator is intended for technical analysis purposes only and does not provide financial advice or trade recommendations. Trading decisions and risk management remain the responsibility of the user.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.