OPEN-SOURCE SCRIPT
Updated Demand Supply Zone Matrix

Demand Supply Zone Matrix by DayTradeSetup
Demand Supply Zone Matrix is an automatic Demand & Supply Zone indicator designed to help traders identify important price areas more clearly without manually drawing every zone.
The system detects potential Supply and Demand zones based on market momentum, volume activity, and the strength of price movement. It also includes zone grading, touch tracking, mitigation reference levels, alerts, and a dashboard summary to help traders filter key zones more efficiently.
Key Features
• Automatic Demand & Supply Zones
Automatically detects potential Supply and Demand zones based on strong directional price movement.
• Strength Grade / Score
Each zone is graded with an A / B / C score to help traders evaluate the quality and strength of each zone more easily.
• 50% Mitigation Line
Displays the midpoint of each zone, which can be used as a reference area for mitigation, retest, or reaction analysis.
• Touch Counter
Tracks how many times price has returned to test a zone, helping traders identify whether a zone is still fresh or has already been tested.
• Zone Retest Alert
Sends an alert when price comes back to test an active Supply or Demand zone.
• Zone Break Alert
Sends an alert when a zone is invalidated or broken by price action.
• Dashboard Summary
Includes a dashboard showing Supply/Demand zone count, best grade, total volume, and overall market bias.
How to Use
This indicator is designed to be used as a technical analysis tool for identifying areas where buying or selling pressure may appear.
Suggested workflow:
1. Check whether Supply or Demand is currently dominant.
2. Focus on higher-grade zones such as A or B.
3. Wait for price to return and test the zone.
4. Use additional confirmation such as Price Action, Market Structure, Trend Direction, or Risk Management before entering a trade.
Suitable For
This indicator is suitable for traders who use concepts such as:
It can be applied to multiple markets, including XAUUSD, Forex, Crypto, Indices, and different timeframes depending on the trader’s strategy.
Disclaimer
This indicator is a technical analysis tool only. It is not a direct Buy/Sell signal and does not guarantee trading results. Traders should always combine it with their own trading plan, risk management, and additional confirmation before making any trading decisions.
Risk Warning: Trading involves risk. Please study and understand the risks carefully before making any investment or trading decision.
Demand Supply Zone Matrix is an automatic Demand & Supply Zone indicator designed to help traders identify important price areas more clearly without manually drawing every zone.
The system detects potential Supply and Demand zones based on market momentum, volume activity, and the strength of price movement. It also includes zone grading, touch tracking, mitigation reference levels, alerts, and a dashboard summary to help traders filter key zones more efficiently.
Key Features
• Automatic Demand & Supply Zones
Automatically detects potential Supply and Demand zones based on strong directional price movement.
• Strength Grade / Score
Each zone is graded with an A / B / C score to help traders evaluate the quality and strength of each zone more easily.
• 50% Mitigation Line
Displays the midpoint of each zone, which can be used as a reference area for mitigation, retest, or reaction analysis.
• Touch Counter
Tracks how many times price has returned to test a zone, helping traders identify whether a zone is still fresh or has already been tested.
• Zone Retest Alert
Sends an alert when price comes back to test an active Supply or Demand zone.
• Zone Break Alert
Sends an alert when a zone is invalidated or broken by price action.
• Dashboard Summary
Includes a dashboard showing Supply/Demand zone count, best grade, total volume, and overall market bias.
How to Use
This indicator is designed to be used as a technical analysis tool for identifying areas where buying or selling pressure may appear.
Suggested workflow:
1. Check whether Supply or Demand is currently dominant.
2. Focus on higher-grade zones such as A or B.
3. Wait for price to return and test the zone.
4. Use additional confirmation such as Price Action, Market Structure, Trend Direction, or Risk Management before entering a trade.
Suitable For
This indicator is suitable for traders who use concepts such as:
- Demand & Supply
- Smart Money Concepts
- Price Action
- Retest Zones
- Momentum Trading
- Intraday Trading
It can be applied to multiple markets, including XAUUSD, Forex, Crypto, Indices, and different timeframes depending on the trader’s strategy.
Disclaimer
This indicator is a technical analysis tool only. It is not a direct Buy/Sell signal and does not guarantee trading results. Traders should always combine it with their own trading plan, risk management, and additional confirmation before making any trading decisions.
Risk Warning: Trading involves risk. Please study and understand the risks carefully before making any investment or trading decision.
Release Notes
Fixed BugsRelease Notes
Updated DTS - DM Zone Matrix- Improved zone stability after chart refresh.
- Added confirmed-bar logic to reduce repaint behavior from live candle recalculation.
- New Supply and Demand zones are now created only after candle close.
- Zone Break and Zone Retest conditions are now confirmed only after the candle closes.
- Cooldown logic has been adjusted to update only on confirmed bars.
- Visual zone extension remains active so existing zones can continue extending to the latest candle.
This update improves the reliability and stability of confirmed Demand/Supply zones while keeping the indicator clean and responsive for real-time chart analysis.
Release Notes
Methodology and Publication Description UpdateThis update clarifies the original methodology of Day Trade Setup – Demand Supply Zone Matrix, including how zones are detected, evaluated, monitored, and compared.
1. Multi-Condition Zone Detection
The script does not create Supply and Demand Zones from a single candle pattern.
A new zone must pass several conditions:
- A sequence of consecutive directional momentum candles
- Volume activity above its recent moving average
- Identification of the most recent opposing base candle
- ATR-adjusted zone construction
- Overlap and cooldown filters
A bearish departure initiates a Supply Zone search, while a bullish departure initiates a Demand Zone search.
2. Base-Candle Identification
After a valid departure is confirmed, the script searches backward for the most recent opposing candle.
- Supply Zones use the last bullish candle before a bearish departure.
- Demand Zones use the last bearish candle before a bullish departure.
This candle represents the structural base from which the directional movement originated.
3. ATR-Normalized Zone Size
Zone height is calculated using Average True Range instead of a fixed number of points.
This allows the zones to adapt to:
- Current market volatility
- Different symbols and price scales
- Changing trading conditions
The optional 50% mitigation line marks the midpoint of each active zone.
4. Zone Strength Score
Each zone receives a score based on:
- Relative directional volume
- Momentum-candle body strength
- Impulse size compared with ATR
- Zone freshness
The score is capped at 100 and classified as:
- Grade A: 75–100
- Grade B: 50–74
- Grade C: Below 50
An untested zone receives the highest freshness bonus. The bonus decreases after repeated retests.
The score is intended to help compare active zones. It does not guarantee that a zone will hold.
5. Retest and Freshness Tracking
The script tracks each separate interaction between price and an active zone.
Zone labels display:
- Zone type
- Strength grade and score
- Directional volume
- Retest count shown as T0, T1, T2, and so on
After a zone is retested, its freshness score decreases and its border changes from solid to dashed.
6. Zone Invalidation
A Supply Zone is invalidated when a confirmed candle closes above its upper boundary.
A Demand Zone is invalidated when a confirmed candle closes below its lower boundary.
Wick penetration alone does not automatically invalidate a zone.
Invalidated zones and their related chart objects are removed automatically.
7. Confirmed-Bar Processing
Important zone events are processed only after the candle closes, including:
- New-zone creation
- Retest counting
- Cooldown updates
- Zone invalidation
This reduces temporary intrabar changes in the analytical state of the zones.
8. Dashboard Matrix
The dashboard compares currently active Supply and Demand conditions.
It displays:
- Number of active zones
- Highest grade on each side
- Combined Supply and Demand volume
- Bullish, Bearish, or Neutral bias
The bias is based on the relative accumulated volume of active zones.
- Bearish: Supply volume exceeds Demand volume by more than 15%.
- Bullish: Demand volume exceeds Supply volume by more than 15%.
- Neutral: Neither side has sufficient dominance.
The dashboard bias is a contextual summary and should not be interpreted as an automatic Buy or Sell signal.
9. How the Components Work Together
Each part of the model has a separate role:
- Momentum candles identify directional displacement.
- Relative volume confirms market participation.
- The opposing candle identifies the structural base.
- ATR adapts zone size to volatility.
- The scoring model ranks relative zone strength.
- Retest tracking measures freshness.
- Invalidation rules manage the zone lifecycle.
- The dashboard compares active Supply and Demand conditions.
These components are combined because no single factor is used as the sole definition of zone quality.
The result is a structured matrix that provides zone location, strength, freshness, volume context, and lifecycle information.
10. Intended Use and Limitations
The indicator is designed to support discretionary technical analysis.
Users should independently confirm price action, define risk, and determine their own entry, stop-loss, target, and position size.
Volume data may differ between symbols and data providers. ATR-based zones may also become wider during periods of high volatility.
A high grade does not guarantee a successful trade.
This indicator does not provide financial advice or guarantee trading results.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
