OPEN-SOURCE SCRIPT
Structural Liquidity Zones

Title: Structural Liquidity Zones
Description:
This script is a technical analysis system designed to map market structure (Liquidity) using dynamic, volatility-adjusted zones, while offering an optional Trend Confluence filter to assist with trade timing.
Concept & Originality:
Standard support and resistance indicators often clutter the chart with historical lines that are no longer relevant. This script solves that issue by utilizing Pine Script Arrays and User-Defined Types to manage the "Lifecycle" of a zone. It automatically detects when a structure is broken by price action and removes it from the chart, ensuring traders only see valid, fresh levels.
By combining this structural mapping with an optional EMA Trend Filter, the script serves as a complete "Confluence System," helping traders answer both "Where to trade?" (Structure) and "When to trade?" (Trend).
Key Features:
1. Dynamic Structure (The Array Engine)
Pivot Logic: The script identifies major turning points using a customizable lookback period.
Volatility Zones: Instead of thin lines, zones are projected using the ATR (Average True Range). This creates a "breathing room" for price, visualizing potential invalidation areas.
Active Management: The script maintains a memory of active zones. As new bars form, the zones extend forward. If price closes beyond a zone, the script's garbage collection logic removes the level, keeping the chart clean.
2. Trend Confluence (Optional)
EMA System: Includes a Fast (9) and Slow (21) Exponential Moving Average module.
Signals: Visual Buy/Sell labels appear on crossover events.
Purpose: This allows for "Filter-based Trading." For example, a trader can choose to take a "Buy" bounce from a Support Zone only if the EMA Trend is also bullish.
Settings:
Structure Lookback: Controls the sensitivity of the pivot detection.
Max Active Zones: Limits the number of lines to optimize performance.
ATR Settings: Adjusts the width of the zones based on volatility.
Enable Trend Filter: Toggles the EMA lines and signals on/off.
Usage:
This tool is intended for structural analysis and educational purposes. It visualizes the relationship between price action pivots and momentum trends.
Description:
This script is a technical analysis system designed to map market structure (Liquidity) using dynamic, volatility-adjusted zones, while offering an optional Trend Confluence filter to assist with trade timing.
Concept & Originality:
Standard support and resistance indicators often clutter the chart with historical lines that are no longer relevant. This script solves that issue by utilizing Pine Script Arrays and User-Defined Types to manage the "Lifecycle" of a zone. It automatically detects when a structure is broken by price action and removes it from the chart, ensuring traders only see valid, fresh levels.
By combining this structural mapping with an optional EMA Trend Filter, the script serves as a complete "Confluence System," helping traders answer both "Where to trade?" (Structure) and "When to trade?" (Trend).
Key Features:
1. Dynamic Structure (The Array Engine)
Pivot Logic: The script identifies major turning points using a customizable lookback period.
Volatility Zones: Instead of thin lines, zones are projected using the ATR (Average True Range). This creates a "breathing room" for price, visualizing potential invalidation areas.
Active Management: The script maintains a memory of active zones. As new bars form, the zones extend forward. If price closes beyond a zone, the script's garbage collection logic removes the level, keeping the chart clean.
2. Trend Confluence (Optional)
EMA System: Includes a Fast (9) and Slow (21) Exponential Moving Average module.
Signals: Visual Buy/Sell labels appear on crossover events.
Purpose: This allows for "Filter-based Trading." For example, a trader can choose to take a "Buy" bounce from a Support Zone only if the EMA Trend is also bullish.
Settings:
Structure Lookback: Controls the sensitivity of the pivot detection.
Max Active Zones: Limits the number of lines to optimize performance.
ATR Settings: Adjusts the width of the zones based on volatility.
Enable Trend Filter: Toggles the EMA lines and signals on/off.
Usage:
This tool is intended for structural analysis and educational purposes. It visualizes the relationship between price action pivots and momentum trends.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.