AI Supply and Demand Zones Indicator
- Indicatori
-
Fadi Hassan Khaled Ghanem
MQL4/MQL5 developer based in Jordan. I have published 169 MetaTrader 5 products on the MQL5 Market (about 8,800 downloads in total).
What I build:
- Custom Expert Advisors from your own trading rules
- Indicators, alerts and multi-timeframe dashboards - Versione: 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.
Frequently Asked Questions
Does it repaint? Zones are detected on closed candles only (of the source timeframe), so a zone is not drawn from an unfinished candle. Existing zones do change state over time - fresh, tested, then removed when a candle closes through the far side - which is the intended tracking, not repainting.
Why do I see very few (or too many) zones? Zone count depends on the base and departure size in ATR and on the maximum zones per side. Lower the departure multiple to see more zones, raise it to keep only the strongest moves.
Can I show higher timeframe zones on a lower chart? Yes. Set the source timeframe input (for example H4 zones on an M15 chart). Retest arrows are shown only when the source timeframe equals the chart timeframe.
Which symbols and timeframes? Any symbol available in your MT5 terminal. H1/H4 zones are common for swing trading and M15 for intraday trading.
Does it have alerts? Yes, alerts on new zones and on first retests, configurable in the alert inputs.
Can it trade the zones automatically, or run on MT4? This free version is an indicator only for MT5. An Expert Advisor that trades the zones with your own risk rules, or an MT4 version, is available as a custom request (see below).
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.
More free tools from the same developer
- AI Break and Retest Zones Indicator - marks levels that broke and are being retested, a useful second check when price returns to a supply or demand zone.
- AI Swing High Low Labels Indicator - labels swing highs and lows (HH/HL/LH/LL) so you can see the structure around each zone.
- AI Liquidity Sweep Reversal Trader - an Expert Advisor that trades reversals after liquidity sweeps; test it in the Strategy Tester first.
