◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Strategies / Supply and Demand Zone Strategy
Concept breakdown

Supply and Demand Zone Strategy

An educational breakdown of the supply and demand zone concept: how traders identify price areas where a sharp, imbalanced move began, mark them as rectangles, and watch how price reacts when it returns. Covers how the idea is defined, how traders structure entries, exits and risk around zones, a valid illustrative Pine v6 detection/marker script, and common pitfalls. Educational only; nothing here is predictive and trading carries the risk of loss.

How it works

Supply and demand is a price-action framework, widely taught across the broader price-action and smart-money / ICT-influenced trading community, for describing areas on a chart where price moved away sharply and one-sidedly. The underlying idea is borrowed from basic economics: when there are more willing sellers than buyers at a price area, supply outweighs demand and price tends to fall; when buyers outnumber sellers, demand outweighs supply and price tends to rise. On a chart, traders try to locate the origin of these imbalanced moves rather than reacting to them after the fact. This is a way of describing observed behaviour, not a measured or proven mechanism.

A "demand zone" is typically drawn at the base, or consolidation area, that immediately preceded a strong rally upward. A "supply zone" is drawn at the base that preceded a strong drop. The reasoning traders give is that the base may represent an area where larger orders were placed but not yet fully filled, so if price returns to that area, remaining interest could produce a reaction. This is a behavioural and narrative model; the presence or filling of such orders cannot be observed on a standard price chart, so treat it as a story traders tell, not a confirmed fact. No zone guarantees anything: it is one way of organising where a trader will pay attention.

Practitioners usually distinguish a few base shapes. Rally-Base-Rally (RBR) and Drop-Base-Rally (DBR) are described as demand patterns; Drop-Base-Drop (DBD) and Rally-Base-Drop (RBD) are described as supply patterns. The "base" is the tight cluster of candles, and the "leg out" is the strong, often near-vertical, sequence of candles leaving it. Many traders require the leg out to clear the base decisively (sometimes phrased as the move showing "imbalance" or leaving a gap-like inefficiency) before they treat the base as a candidate zone.

The zone itself is then drawn as a rectangle. A common convention places the proximal line (the edge nearest current price) and the distal line (the far edge) around the base candles' bodies and/or wicks, then extends that rectangle forward in time. Conventions vary: some traders use only candle bodies, some include wicks, and some use the open of the leg-out candle, so there is no single "correct" rectangle. Many traders watch how price behaves the first time it revisits the zone, on the logic that untouched, "fresh" zones are the ones they treat as more relevant; a zone that has already been traded through repeatedly is often considered consumed.

It is important to be clear about scope. Supply and demand zone trading is largely discretionary: where exactly to draw the rectangle, how strong the leg out must be, and which timeframe to trust are judgement calls that differ from trader to trader. Because of that, it does not reduce cleanly to a single mechanical strategy, and any automated version is an approximation of a human's eye. Nothing about a zone is predictive, and price can and does pass straight through zones without reacting. Treat all of this as a way to structure attention and risk, not as a signal that produces a particular outcome.

Entry rules

Exit rules

Risk notes

Pine v6 example

//@version=6
// ILLUSTRATIVE detection/marker script ONLY.
// Supply & Demand zone trading is discretionary (where you draw the
// rectangle is a judgement call), so it does NOT reduce to a clean
// mechanical strategy. This indicator approximates the IDEA: it flags a
// tight "base" candle followed by a strong "leg out" and draws a zone box
// around the base candle's high-to-low range. It is a visual aid, not a
// signal. Nothing here is predictive; trading risks loss. Past behaviour
// does not indicate future results.

indicator("S&D Zone Marker (Illustrative)", overlay = true, max_boxes_count = 100)

// --- Inputs -----------------------------------------------------------
baseMaxAtr = input.float(0.6, "Max base range (xATR)", minval = 0.1, step = 0.1)
legMinAtr  = input.float(1.5, "Min leg-out body (xATR)", minval = 0.5, step = 0.1)
atrLen     = input.int(14, "ATR length", minval = 1)
extendBars = input.int(40, "Extend zone (bars)", minval = 1)
showSupply = input.bool(true, "Show supply zones")
showDemand = input.bool(true, "Show demand zones")

atr = ta.atr(atrLen)

// --- Define "base" = previous candle with a small range vs ATR --------
baseRange   = high[1] - low[1]
isTightBase = baseRange <= baseMaxAtr * atr[1]

// --- Define "leg out" = current candle with a large directional body --
bodySize  = math.abs(close - open)
strongLeg = bodySize >= legMinAtr * atr
legUp     = strongLeg and close > open      // rally out of base -> demand
legDown   = strongLeg and close < open      // drop out of base  -> supply

// A candidate demand zone: tight base then strong up leg
newDemand = isTightBase and legUp and showDemand
// A candidate supply zone: tight base then strong down leg
newSupply = isTightBase and legDown and showSupply

// --- Draw zones around the BASE candle (the [1] bar) ------------------
// Uses only data available at the close of the current bar; the box is
// anchored to a historical bar (bar_index - 1) so it does not move once
// formed.
if newDemand
    box.new(left = bar_index - 1, top = high[1], right = bar_index + extendBars, bottom = low[1], border_color = color.new(color.teal, 0), bgcolor = color.new(color.teal, 85), xloc = xloc.bar_index)

if newSupply
    box.new(left = bar_index - 1, top = high[1], right = bar_index + extendBars, bottom = low[1], border_color = color.new(color.red, 0), bgcolor = color.new(color.red, 85), xloc = xloc.bar_index)

// Optional markers under/over the leg-out candle for visibility.
plotshape((newDemand) and barstate.isconfirmed, title = "Demand base", style = shape.triangleup, location = location.belowbar, color = color.teal, size = size.tiny)
plotshape((newSupply) and barstate.isconfirmed, title = "Supply base", style = shape.triangledown, location = location.abovebar, color = color.red, size = size.tiny)

// Reminder: this only MARKS candidate zones. It does not decide entries,
// stops or targets, and it cannot confirm a zone will hold. Validate any
// rule set independently before relying on it.

Pitfalls

FAQ

What is the difference between a supply zone and a demand zone?

A demand zone is drawn at the base, or consolidation, that came right before a strong move up — traders treat it as an area where buying interest previously outweighed selling. A supply zone is the base that came right before a strong move down, treated as an area where selling outweighed buying. The labels just describe which direction the imbalanced move left the base. Neither label implies price must react there; zones are areas of interest, not predictions, and price can pass straight through.

How is supply and demand different from support and resistance?

They overlap but are framed differently. Support and resistance are usually horizontal lines drawn at price levels that have been touched repeatedly. Supply and demand zones are rectangles (areas, not lines) drawn at the origin of a sharp, one-sided move, and many traders specifically value 'fresh' zones that have not been retested — in contrast to a resistance level, which often gets its reputation precisely from being touched many times. In practice traders use both, and a zone overlapping a known level is usually treated as added confluence rather than proof of anything.

Can supply and demand zones be fully automated?

Only approximately. Where to draw the rectangle, how strong the leg out must be, and which timeframe to trust are discretionary judgement calls, so the concept does not reduce to one clean mechanical strategy. A script (like the illustrative one above) can flag candidate bases and draw boxes, but it cannot reproduce a trader's full read of context, and it cannot confirm a zone will hold. If you do automate any version, check carefully that it does not repaint zones using future bars or reference look-ahead data, since that can make a backtest look much better than reality.

Educational & software only — not financial advice, not a recommendation to trade. Backtests are illustrative; past performance does not predict future results. Trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro