AI Supply and Demand Zones Indicator
- Indicators
- Version: 1.0
Automatic supply and demand zones built from real base-and-departure price action.
How it works
The indicator looks for a base of one to three small candles (body below a set share of ATR) followed by a strong departure candle (body above a larger ATR multiple) that closes beyond the base. A bullish departure creates a demand zone around the base, and a bearish departure creates a supply zone.
Each zone is then tracked candle by candle. A fresh zone has not been revisited. When price comes back into it for the first time, it becomes tested and is drawn in a lighter color. When a candle closes through the far side of the zone, it counts as broken and is removed from the chart.
Key features
- Base-and-departure detection on closed candles only
- Fresh, tested and broken zone states with separate colors
- Zones extend to the right of the current price
- Maximum number of zones per side to keep the chart clean
- Optional higher timeframe source, for example H4 zones on an M15 chart
- Optional "Supply" / "Demand" labels and price tooltips
- First retest arrows (when the source timeframe equals the chart timeframe)
- Alerts on new zones and first retests
Recommended
Any symbol. H1 and H4 zones are popular for swing trading, and M15 zones for intraday trading.
Inputs
Source timeframe, ATR period, maximum base candles, base and departure size in ATR, maximum zones per side, max bars to calculate, zone colors for each state, labels, retest arrows, zone extension and alert options.
Note
Zones are built only from closed candles of the source timeframe, so a zone never appears and then disappears because of an unfinished candle. Zones are removed only when price closes through them.
How to read the zones
- Demand zone (fresh color) - an area where buyers previously pushed price away strongly. Price has not returned yet.
- Supply zone (fresh color) - an area where sellers previously pushed price away strongly. Price has not returned yet.
- Tested zone (lighter color) - price has already come back into the zone once. Many traders treat a second or third visit as weaker than the first.
- Zone removed - a candle closed through the far side, so the zone is no longer valid.
- Retest arrow - marks the first candle that re-entered a fresh zone. It is information, not a trade signal on its own; combine it with your own trend, session or risk rules.
If you see too many or too few zones, adjust the base and departure size in ATR: a larger departure multiple keeps only the strongest moves, a smaller one shows more zones.
Need a custom version?
I can adapt this indicator to your own rules - extra filters, multi-timeframe zone confluence, different alerts, an Expert Advisor that trades the zones with your risk settings, or an MT4 version. Send me a private message here on MQL5 (or offer me a personal order via MQL5 Freelance) with your requirements, and I will reply within 24 hours with whether it is doable and the estimated scope. If you find this free indicator useful, please leave a review - it helps a lot.
