What Is Donchian channel?

A Donchian channel describes the range of the last N bars of OHLCV data. Its upper and lower bands are the maximum high and minimum low, and its centre is their arithmetic mean. If the last 20 completed sessions span 80 to 100, the centre is 90. A subsequent print at 101 crosses yesterday’s upper band. For breakout trading, lag the channel by one bar when testing a new high. Including the current high in the maximum makes a strict break above it impossible.

For an implementation reference with all three bands, see TradingView’s Donchian channel calculation.