19 — Volatility

Donchian Channels#

Debated1 min read
◆ The PatternThe highest high and lowest low of the last N bars; leaving that range is the signal

Donchian Channels — Richard Donchian, the "father of trend following."

Upper = Highest High of N periods
Lower = Lowest Low of N periods
Middle = (Upper + Lower) / 2
Turtle Traders: Richard Dennis's famous experiment used Donchian channel breakouts:
• Buy when price breaks above 20-day high
• Sell when price breaks below 20-day low
• Exit at 10-day opposite channel
Worked example

Five-day channel. On day 7 the close of 109 tops the previous five days’ highest high of 108: a breakout. On day 15 the channel runs from 98 to 105, and the close of 104 sits just inside the top.

The example data: 15 days, used in every indicator here
DayHighLowCloseVolume
11019910050,000
210310010262,000
310310010148,000
410510110470,000
510810410785,000
610810510660,000
711010610990,000
811010710872,000
910810410580,000
1010510210366,000
1110510210455,000
1210410110275,000
13102989995,000
141029910164,000
1510510110471,000
Where it misleads
  • Most breakouts in a range fail. The system lives on a few long trends and loses small amounts often in between.
  • Exits are slow: when a trend ends, the opposite edge of the channel can be far away.
  • The look-back is the whole strategy — 20 days and 55 days give very different trades — and tuning it on history overfits.
In code
df['dc_up'] = df['high'].rolling(5).max()
df['dc_lo'] = df['low'].rolling(5).min()
df['dc_mid'] = (df['dc_up'] + df['dc_lo']) / 2
df['breakout'] = df['close'] > df['dc_up'].shift()   # close above the prior range
Python, in your browser — edit the code and run it again

Assumes import numpy as np, import pandas as pd, and a DataFrame df with columns high, low, close and volume — the 15 days above.

Sources
  • C. Faith, Way of the Turtle, McGraw-Hill, 2007 — the Turtle traders’ Donchian breakout rules
  • Trading Systems and Methods (5th ed.), P. J. Kaufman, Wiley, 2013

Last reviewed October 2026 · How this site checks its content · Report a mistake

Pattern bridge: Highest high and lowest low over N periods is the range (max-min) from descriptive statistics.
Linked from 1
← Previous
Keltner Channels
Open in the full reader, with the topic sidebar