Donchian Channels Explained: Breakouts and Range
Donchian channels are three lines plotted from recent price extremes: the upper band is the highest high over the last N bars, the lower band is the lowest low, and the middle line is the average of the two. Traders use them mainly to catch breakouts, where price closing beyond the band signals a possible new trend.
Invented by commodities trader Richard Donchian, the indicator is one of the simplest tools in technical analysis, yet it powered one of the most famous trading experiments ever run. This guide covers how the channel is built, the legendary Turtle Traders who traded it, how to read the channel for range versus trend, the whipsaw problem in choppy markets, and how it looks on MT5.
How the channel is built
Pick a lookback period, N, usually 20 bars. For every bar, the indicator scans the previous N bars and draws three lines:
| Line | Formula | What it shows |
|---|---|---|
| Upper band | Highest high of last N bars | The ceiling buyers must break to extend an uptrend |
| Lower band | Lowest low of last N bars | The floor sellers must break to extend a downtrend |
| Middle line | (Upper + Lower) / 2 | The midpoint of the range, used as a mean or exit reference |
Because the bands are simply the highest and lowest prices in the window, the upper band can only rise or stay flat, and the lower band can only fall or stay flat, until an old extreme drops out of the lookback. The channel therefore widens when volatility expands and narrows when the market coils into a tight range. That breathing motion is the heart of how the tool is read.
Classic use: breakout trading and the Turtle Traders
The original idea is direct: when price closes above the upper band, the market has made a new N-bar high, so go long. When price closes below the lower band, it has made a new N-bar low, so go short. The break of a long-standing extreme is treated as evidence that a fresh trend is starting.
This is exactly the logic behind the Turtle Traders. In the early 1980s, traders Richard Dennis and William Eckhardt made a bet about whether trading could be taught. Dennis recruited a group of novices, nicknamed the Turtles, and handed them a fully mechanical system built largely on Donchian breakouts:
- Entry: buy a 20-day high breakout, sell a 20-day low breakout.
- Exit: close longs on a 10-day low, close shorts on a 10-day high, using the shorter opposite channel.
- Risk: position size scaled to volatility (using Average True Range), risking a small, fixed fraction of capital per trade.
The Turtles reportedly went on to earn substantial profits, and the experiment became a lasting case study in disciplined, rules-based trend following. The channel breakout was the trigger, but money management and the willingness to sit through many small losses to catch a few big trends were just as important.
Want one clear verdict instead of staring at bands?
Market Structure Pro reads 27 tools and outputs a single Buy, Sell or Wait call with a confidence score and plain-English reasoning.
Start your free 7-day trialReading the channel: range vs trend
Beyond the entry signal, the shape of the channel tells you what kind of market you are in:
- Trending: in a strong uptrend, price rides along or hugs the upper band while the lower band trails well below. The reverse holds in a downtrend. The middle line slopes clearly in the trend direction.
- Ranging: when the bands run roughly horizontal and price oscillates between them, the market is range-bound. Here the bands act like support and resistance, and breakouts are far more likely to fail.
- Squeeze: a narrowing channel signals contracting volatility. It often precedes a sharp expansion, though it does not tell you which direction the break will take.
This is why the middle line matters. In a range, price returning to the midpoint is normal; in a trend, a deep pullback toward the midpoint can offer a continuation entry. Combining the channel with classic support and resistance levels gives a fuller picture of where breaks are meaningful and where they are noise.
The whipsaw caveat in chop
The breakout system's great weakness is the whipsaw. In a sideways market, price repeatedly nudges past the upper or lower band and then snaps back, firing breakout signals that immediately reverse into losses. A trader who takes every break in a quiet, directionless market can bleed capital through a chain of small stop-outs.
There are three common defences:
- Use a longer lookback (for example 40 or 55 bars) so only larger, more decisive breaks count.
- Require a confirmed close beyond the band rather than an intrabar touch, filtering out brief spikes.
- Add a trend or volatility filter so you only take breakouts when the broader market is actually trending, not stuck in a range.
No single setting solves it completely. Donchian channels are a lagging, price-only tool; they react to what has already happened and carry no context about whether conditions favour a breakout.
Using Donchian channels on MT5
MetaTrader 5 does not ship with a Donchian channel as a default indicator, but it is one of the most commonly available custom indicators in the MQL5 community, and many free versions exist. Once installed you set the period (N) and apply it to any chart. A few practical notes:
- Some versions plot the bands using the high/low of completed bars only, which avoids the band repainting as the current bar forms. Confirm which behaviour your version uses.
- Pair it with ATR for position sizing if you want to recreate the Turtle approach faithfully.
- Backtest the exact breakout rules in the Strategy Tester before trading them live, since a system that looks clean on a trending chart can fall apart in a ranging period.
Where Market Structure Pro stands
Honest disclosure: MSP does not use Donchian channels. It is not one of the 27 tools in the engine.
That said, MSP tackles the same problem the channel was built for, identifying breakouts and respecting key levels, but from a different angle. It tracks key support and resistance in market structure, and crucially it runs a ranging filter. When the market is not trending, MSP recognises that condition and steps back rather than chasing breaks that are statistically likely to fail. That directly addresses the whipsaw problem that catches so many naive channel-breakout traders.
Instead of leaving you to interpret bands and decide for yourself, MSP folds 27 tools into a single verdict with a confidence score, an A / B / C setup grade, and a plain-English explanation of why. It is non-repainting, works on every MT5 instrument, and you can test it on a free 7-day trial. You can also see how it sits against other tools in our guide to the best MT5 indicators for 2026.
Trade breakouts without the whipsaws
Let MSP's ranging filter and key-level tracking tell you when a break is worth taking. One verdict, full reasoning, every MT5 instrument.
Start your free 7-day trialKeep learning: head back to the Learn hub, brush up on support and resistance, or return home.