OPEN-SOURCE SCRIPT
Liquidity Pools

This indicator uses SMC (ICT) concept for valid liquidity pools' identification.
It maps active liquidity pools using confirmed structural swing highs and swing lows. It is built on the same structural swing comparison logic as the SMC Structure Identifier, but focuses specifically on unswept structural highs and lows.
The swing logic uses configurable lookback and forward confirmation windows. Raw swings are filtered into structural swings by comparing consecutive highs and lows. If multiple swings of the same type occur before an opposite swing confirms structure, only the most extreme swing is kept. These surviving structural swings become potential liquidity pools.
Features:
• Confirmed swing high and swing low detection
• Structural swing filtering with overwritten swing handling
• Active liquidity levels from structural highs and lows
• Automatic invalidation when liquidity is swept
• Optional hiding or graying out of swept pools
• Configurable maximum pool age in bars
• Customizable high-side and low-side liquidity colors
• Customizable pool line width and line style
• Optional display of structural and ignored swing markers
Logic:
A liquidity pool is created from a structural swing high or structural swing low.
High-side liquidity:
• Created from confirmed structural highs
• Remains active while price stays below it
• Becomes invalid when a later candle’s high trades above the level
Low-side liquidity:
• Created from confirmed structural lows
• Remains active while price stays above it
• Becomes invalid when a later candle’s low trades below the level
Older active pools can be automatically removed using the maximum pool age setting, which helps keep the chart focused on recent liquidity instead of historical levels.
This tool is intended for traders who use market structure, swing points, and liquidity concepts in discretionary analysis.
Note:
1. Liquidity inside SMC is subjective and has many representations; this indicator is an attempt to implement on of the simplest variations into the code. Regulate Lookforward and Lookback variables to find the most suitable liquidity pools from swings for you.
2. This indicator does not provide buy or sell signals. It is a visual liquidity-mapping tool and should be used together with your own trading plan, risk management, and additional analysis.
It maps active liquidity pools using confirmed structural swing highs and swing lows. It is built on the same structural swing comparison logic as the SMC Structure Identifier, but focuses specifically on unswept structural highs and lows.
The swing logic uses configurable lookback and forward confirmation windows. Raw swings are filtered into structural swings by comparing consecutive highs and lows. If multiple swings of the same type occur before an opposite swing confirms structure, only the most extreme swing is kept. These surviving structural swings become potential liquidity pools.
Features:
• Confirmed swing high and swing low detection
• Structural swing filtering with overwritten swing handling
• Active liquidity levels from structural highs and lows
• Automatic invalidation when liquidity is swept
• Optional hiding or graying out of swept pools
• Configurable maximum pool age in bars
• Customizable high-side and low-side liquidity colors
• Customizable pool line width and line style
• Optional display of structural and ignored swing markers
Logic:
A liquidity pool is created from a structural swing high or structural swing low.
High-side liquidity:
• Created from confirmed structural highs
• Remains active while price stays below it
• Becomes invalid when a later candle’s high trades above the level
Low-side liquidity:
• Created from confirmed structural lows
• Remains active while price stays above it
• Becomes invalid when a later candle’s low trades below the level
Older active pools can be automatically removed using the maximum pool age setting, which helps keep the chart focused on recent liquidity instead of historical levels.
This tool is intended for traders who use market structure, swing points, and liquidity concepts in discretionary analysis.
Note:
1. Liquidity inside SMC is subjective and has many representations; this indicator is an attempt to implement on of the simplest variations into the code. Regulate Lookforward and Lookback variables to find the most suitable liquidity pools from swings for you.
2. This indicator does not provide buy or sell signals. It is a visual liquidity-mapping tool and should be used together with your own trading plan, risk management, and additional analysis.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.