OPEN-SOURCE SCRIPT
Fundamentals of Liquidity & Trend Filter v2

Here is the amended TradingView Pine Script v6 indicator.
The previous version highlighted the background, but this updated script actively draws horizontal liquidity boxes directly on the chart, which act as visual representations of liquidity pools or dense order book zones. It also explicitly plots the fast Exponential Moving Average (EMA) and slow Simple Moving Average (SMA) lines and ensures they are highly visible.
What is new in this version:
Explicit EMA/SMA Plots: The fast EMA and slow SMA are drawn with thicker lines to ensure they overlay clearly on top of the price candles. The SMA helps filter out microstructure noise, while the EMA tracks immediate momentum.
Horizontal Liquidity Zones: Instead of coloring the background, the script now draws dynamic horizontal boxes around the price action (from the highest high to the lowest low) whenever the market enters a high-liquidity regime.
Liquidity Percentages: Inside each horizontal box, the script dynamically updates and displays the peak "Relative Liquidity %" achieved during that specific liquidity zone, allowing you to gauge the density of the volume pool supporting that price level.
The previous version highlighted the background, but this updated script actively draws horizontal liquidity boxes directly on the chart, which act as visual representations of liquidity pools or dense order book zones. It also explicitly plots the fast Exponential Moving Average (EMA) and slow Simple Moving Average (SMA) lines and ensures they are highly visible.
What is new in this version:
Explicit EMA/SMA Plots: The fast EMA and slow SMA are drawn with thicker lines to ensure they overlay clearly on top of the price candles. The SMA helps filter out microstructure noise, while the EMA tracks immediate momentum.
Horizontal Liquidity Zones: Instead of coloring the background, the script now draws dynamic horizontal boxes around the price action (from the highest high to the lowest low) whenever the market enters a high-liquidity regime.
Liquidity Percentages: Inside each horizontal box, the script dynamically updates and displays the peak "Relative Liquidity %" achieved during that specific liquidity zone, allowing you to gauge the density of the volume pool supporting that price level.
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.