Supply & Demand Zones XLDescription
Supply & Demand Zones XL is a non-repainting supply and demand indicator designed to model market structure with a focus on stability, clarity, and quantitative strength evaluation.
The script identifies supply and demand zones using pivot-based structure and sizes each zone dynamically using ATR, ensuring consistent scaling across different market conditions. Zones are extended forward in real time and maintained as either active or historical depending on user preference.
Each zone is scored using a composite strength model that incorporates volume participation, zone width efficiency, time in market, and touch frequency. The resulting strength rating is normalized to a simple X/10 format and displayed at the end of each zone for immediate readability.
A non-repainting mode ensures that zones are only confirmed after pivot completion, preventing forward-looking bias. An optional volume filter allows users to require above-average participation before a zone is formed.
The script includes logic to prevent redundant structure by disallowing overlapping zones of the same type while the current zone remains valid. Once a zone is broken, new zones are allowed to form, preserving structural continuity.
Zones are considered broken only on confirmed closes beyond their boundaries, not intrabar wicks. Broken zones are downgraded in strength and can be visually differentiated using customizable color controls. Users can independently control coloring for active and historical broken zones, as well as define separate colors for supply, demand, broken supply, and broken demand.
Historical zones can be toggled on or off, with optional strength labels, allowing users to balance context versus chart clarity.
The result is a structured, state-driven supply and demand model that avoids noise, reduces duplication, and provides a consistent framework for evaluating zone quality and market behavior.
Pine Script® indicator


















