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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。