Donchian channels
The highest high and lowest low of the last N bars, drawn as a channel on the price.
Donchian channels track the highest high (upper line) and the lowest low (lower line) over the last N bars, counting the current bar. At the default 20 bars that is the range of the last 20 minutes on a one-minute chart. The middle line is the midpoint of the two, not an average of closes, so the channel shows the range price has covered lately rather than where it typically trades.
How to read it
- The three lines sit on the price scale and are drawn over the candles.
- Reaching the upper line means this bar's high is the highest of the last N bars; reaching the lower line, its low is the lowest.
- The middle sits halfway between the other two, so it shifts only when one of the extremes shifts.
- On the sampled SPY month, the lines sat about 0.04 percent from the close at the median.
What it outputs
- Middle
- Midpoint of the upper and lower lines. Not an average of closes.
- Upper
- Highest high of the last N bars, including the current bar.
- Lower
- Lowest low of the last N bars, including the current bar.
Settings
- Window
- How many bars the high and low look back over. Shorter (5 to 20) keeps the channel tight to the last few minutes and the lines move often. Longer (100 or more) spans a wider range; the lines move less often but jump further when an old extreme drops out.
Pitfalls
- The window includes the current bar, so the upper line is never below the current high and a close cannot clear it on the same bar. A breakout rule must compare against the prior bar's channel.
- The window counts bars, not time, and the indicator does not reset it at the day's open, so early-session lines can carry extremes from the previous session.
- Lines jump in steps when an old high or low leaves the window, so they can move sharply with no new price action.