Donchian Channels: The Breakout Box the Turtles Got Rich On

Highest high, lowest low, and how to trade the breakout

Donchian Channels
Donchian Channels

Donchian Channels might be the most gloriously simple indicator in this entire series — simpler even than a moving average. There’s no smoothing, no weighting, no formula worth the name. It’s just: the highest high and the lowest low over the last N bars. And yet a version of this handed a group of novices legendary fortunes. Let’s do the (barely-there) math.

The one-sentence job

Donchian Channels draw the highest high and lowest low of the last N bars as an upper and lower band, with a midline between them. Price poking above the upper band means a new N-bar high (breakout up); below the lower band, a new N-bar low.

The formula

With a common period of 20:

Upper  = Highest High over the last N bars
Lower  = Lowest Low over the last N bars
Middle = (Upper + Lower) / 2

That’s the entire thing. No averages, no exponents — just a rolling maximum and minimum. On the chart above, the bands look like a series of steps: each stays flat until price prints a new extreme, then jumps to the new level.

How to read it

Breakouts — the classic use. When price closes above the upper channel, it has made a new N-bar high — a breakout signal to go (or stay) long. A close below the lower channel is the short signal. This is pure trend-following: buy strength, sell weakness, on the theory that new highs beget new highs.

One crucial detail: for a breakout signal you compare price to the channel formed by the prior bars (the channel excluding today), because today’s own high is part of today’s channel — if you include it, price can never exceed its own upper band. Shift the channel back one bar for signals. (For display, the current-bar channel is fine and standard.)

The midline. The center line acts as a trend reference and a common exit — some systems exit a long when price falls back to the midline.

Channel width = volatility. A wide channel means big recent range (volatile); a narrow one means quiet. A narrowing channel can precede a breakout.

Asymmetric periods. A powerful variation uses a longer channel for entries and a shorter one for exits — e.g., enter on a 20-bar breakout, exit on a 10-bar breakout in the other direction. This is essentially the Turtle system (see the history).

The settings

20 is the popular default (the Turtles’ faster system); 55 was their slower one, and Donchian’s original “4-week rule” is roughly a 20-trading-day channel. Longer channels catch bigger, rarer moves with fewer whipsaws; shorter ones trade more often. Test, don’t assume.

Where it lies to you

  • It’s murder in a range. In a sideways market, price pokes above and below the channel repeatedly, handing you a string of false breakouts. Donchian breakouts need a trending environment to shine, which is why trend-followers accept many small losses waiting for the few big trends.
  • It lags by construction. By the time price makes a new 20-bar high, a chunk of the move has happened. Breakout systems buy late on purpose — they trade continuation, not bottoms.
  • The prior-bar subtlety. Forgetting to shift the channel for signals is the classic Donchian coding bug (your breakouts never trigger).

Donchian Channels are the purest expression of “the trend is your friend, buy new highs.” Unglamorous, laggy, and psychologically hard to trade — and yet the backbone of some of the most successful systematic trading ever documented.

Now go test it, don’t trust it

Donchian breakouts are famously backtestable — that’s the whole point of a mechanical system. Build a 20-bar breakout with a 10-bar exit in AlgoGen and see the trend-following reality (lots of small losses, occasional big wins). Then build the channel yourself in Python, MQL5, Pine Script, EasyLanguage, or NinjaScript.


This post is educational, not financial advice. Indicators describe the past; they don’t predict the future. Backtest anything before you risk real money on it.

Historical research from the Algogen archive. Not investment advice.

Blog

Have a strategy idea?

Describe it in plain English, preview where your rules fire, then decide whether the evidence is worth a backtest.

Keep me postedHow it works