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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.