Donchian Channels explained: how to read and use them
By Oalgo · Last reviewed
Donchian Channels draw the highest high and the lowest low of the last 20 candles as two lines on the price chart, with a middle line halfway between them. A candle that sets a new 20-candle high lands on the upper line, and one that sets a new low lands on the lower line.
How are Donchian Channels calculated?
#- Upper line: the highest high of the last 20 candles, including the current one.
- Lower line: the lowest low of the last 20 candles, including the current one.
- Middle line = (upper line + lower line) ÷ 2.
- The lines start on candle 20, the first time 20 candles exist.
There is no multiplier and no average of closes: the upper and lower lines are real highs and lows from the last 20 candles.
Why do the lines move in steps?
#The upper line stays flat until a higher high appears, or until the candle that set it is old enough to drop out of the window. Then it falls to the next highest high inside the window. The table shortens the window to 5 candles so you can follow it.
| Candle | High | Low | Upper line | Lower line | Middle line |
|---|---|---|---|---|---|
| 1 | 105 | 99 | – | – | – |
| 2 | 108 | 101 | – | – | – |
| 3 | 107 | 100 | – | – | – |
| 4 | 110 | 104 | – | – | – |
| 5 | 109 | 103 | 110 | 99 | 104.5 |
| 6 | 106 | 102 | 110 | 100 | 105 |
| 7 | 107 | 105 | 110 | 100 | 105 |
| 8 | 104 | 101 | 110 | 101 | 105.5 |
| 9 | 105 | 102 | 109 | 101 | 105 |
On candle 6 the lower line rose from 99 to 100 because candle 1 left the window. On candle 9 the upper line fell from 110 to 109 because candle 4 left it.
How do you read Donchian Channels?
#| What you see | What it suggests |
|---|---|
| Candle at the upper line | Its high is the highest of the last 20 candles. |
| Candle at the lower line | Its low is the lowest of the last 20 candles. |
| Lines far apart | Price has covered a lot of ground in the last 20 candles. |
| Lines close together | Price has stayed in a tight range. |
| Price near the middle line | Price is halfway between its recent high and low. |
The channel includes the current candle, so a close can never be above the upper line of the same candle. A breakout rule compares the close with the upper line from the candle before. The breakout strategy page shows the full rule.
How do people use Donchian Channels in rules?
#- Enter when the close is above the upper line of the candle before, and exit when it falls below the middle line or the lower line.
- Use the middle line as a trend filter: only look for entries above it.
- Take entries only while the channel is wide, or only while it is narrow, depending on the idea you are testing.
- Change the length. A shorter channel is crossed more often and a longer one less often.
What can Donchian Channels not tell you?
#A new high does not say price will keep rising, and price often falls back into the channel. One spike sets the upper line for the next 20 candles, even if price never trades there again. Keltner Channels draw a channel from candle size instead of from the extremes. Test any rule on past prices with a backtest, then forward test it.
In Oalgo you can tell Oalgo AI your Donchian Channels rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.
Read next
- Breakout trading strategy: a Donchian channel exampleA breakout strategy enters when price closes above the highest high of recent candles. See the Donchian rules, false breakouts, and how to test them.
- Keltner Channels explained: how to read and use themKeltner Channels draw lines around an EMA, set apart by ATR. See how they are calculated, how they differ from Bollinger Bands, and how to test rules.