Library · Indicators
Donchian Channels
Donchian Channels plot the highest high and the lowest low of the last N periods, so the band shows the full price range the market has covered recently.
Why it matters
Most indicators transform price through averages and ratios. Donchian Channels do almost nothing to it. They mark the highest price and the lowest price the market has reached over a recent window, and draw a line at each.
That makes them one of the easiest indicators to verify by eye, and a clear way to answer a basic question: is price at the top, the bottom or the middle of where it has recently been? The channel is named after Richard Donchian, a commodities trader associated with early rule-based trend following.
What it looks like
The channel has an upper line and a lower line, and many platforms add a middle line halfway between them. Unlike most envelopes, the lines move in flat steps. A line stays level for as long as the same candle holds the record, then jumps.
In plain words
Think of the high-water and low-water marks on a harbour wall over the last 20 days. The marks only change when a new tide beats the record, or when the old record day drops out of the 20-day window. They tell you how far the water has ranged lately. They do not forecast tomorrow’s tide.
How it is calculated
- Take the windowLook at the last N candles, commonly 20.
- Upper lineThe highest high in the window.
- Lower lineThe lowest low in the window.
- Slide forwardNext period, drop the oldest candle and add the newest.
Upper = highest high of the last N periodsLower = lowest low of the last N periods. Middle = (Upper + Lower) / 2.- Upper line107Highest of the highs 104, 106, 105, 107, 103.
- Middle line102.5Halfway: (107 + 98) / 2.
- Lower line98Lowest of the lows 100, 101, 99, 102, 98.
One step forwardHypothetical illustration
All prices are hypothetical, with a 5-period window.
The last five candles have highs of 104, 106, 105, 107 and 103, and lows of 100, 101, 99, 102 and 98. The upper line is 107, the lower line is 98 and the middle line is (107 + 98) / 2 = 102.5.
The next candle has a high of 108 and a low of 104. The oldest candle (high 104, low 100) leaves the window.
- New highs in the window: 106, 105, 107, 103, 108. Upper line = 108.
- New lows in the window: 101, 99, 102, 98, 104. Lower line = 98, unchanged.
- Middle line = (108 + 98) / 2 = 103.
Four periods later, the candle with the low of 98 will leave the window. Unless a lower low has printed by then, the lower line will jump up even if nothing notable happens on that day.
Settings and what they change
| Setting | Effect | Trade-off |
|---|---|---|
| Shorter window (for example 10) | Narrow channel that price reaches often | Many new highs and lows that are quickly reversed |
| Common window (20) | Four weeks of daily candles in a market that trades five days a week | A middle ground |
| Longer window (for example 55) | Wide channel that price reaches rarely | Lines can sit far from current price for a long time |
One detail varies between platforms. Some include the current candle in the window, so price can touch the line but never close beyond it. Others use only the previous N candles, so price can be seen moving through the line. Both are the same idea drawn one candle apart.
A window chosen because past pushes through the line happened to continue is a fitted window. That is overfitting, and the pattern it found may be nothing more than chance.
How to read it
- Price at the upper line: the market is trading at its highest level of the last N periods. Price at the lower line: it is at its lowest.
- Channel width: the distance between the lines is the full recent range, a blunt measure of volatility. A wide channel means price has covered a lot of ground.
- Flat lines on both sides: price has made neither a new high nor a new low for a while, which is typical of a range.
- One line stepping repeatedly: price keeps setting new extremes in one direction, which is what a trend looks like through this lens.
A new N-period high is, by definition, a breakout above the recent range. It is not evidence that the move continues. Many such pushes turn out to be fakeouts.
Going deeper
Donchian’s best-known idea, the “four-week rule”, was a mechanical trend-following rule built on four-week highs and lows. It is described in the technical analysis literature as a historical example of a simple rule-based approach. It is not presented here as something to follow, and results of any such rule depend heavily on the market, the period and the costs involved.
Compared with Keltner Channels and Bollinger Bands, Donchian Channels are driven entirely by extremes. One very long wick can set the upper or lower line for the whole window. Practitioners therefore tend to compare the lines with levels visible in market structure, such as earlier swing highs, instead of relying on the channel alone.
What it does NOT mean
- A new 20-period high is not a signal. It is a fact about the last 20 candles. What happens next is not contained in it.
- The lower line is not support and the upper line is not resistance. They are records of past extremes, not places where orders are known to wait.
- A narrow channel does not predict a large move. It records that the recent range has been small.
- The middle line is not fair value. It is the midpoint of two extremes and can be dragged by a single wick.
Common mistakes
- Assuming every push through a line continues. Failed pushes are common, especially in sideways markets.
- Forgetting the drop-off. A line can jump because an old candle left the window, not because of anything in today’s trading.
- Ignoring single-wick extremes. One thin, brief spike can define the channel for N periods.
- Mixing platform conventions. Whether the current candle is included changes how touches and closes appear.
- Optimising the window. The window that looked best on past data was selected with hindsight.
Risks and limitations
- The channel is built only from past highs and lows and reacts only after a new extreme has printed.
- It says nothing about how price moved inside the range, or about volume.
- It is highly sensitive to outliers and to data quality, since a single bad tick can become the line.
- In sideways markets, price reaches both lines repeatedly without any lasting move.
Key takeaway
Donchian Channels show the highest high and lowest low of the last N periods. They describe where price sits within its recent range, and a new high or low is a record of the past, not an instruction.
Sources and further reading
- Technical Analysis of the Financial Markets, John J. Murphy (1999). Describes Richard Donchian's four-week rule, the idea behind the channel