Mechanism and definition
Donchian Channels are a volatility-related indicator built from recent price extremes. They typically plot three lines over time:
- Upper band: the highest observed price high within a rolling lookback window.
- Lower band: the lowest observed price low within the same rolling lookback window.
- Midline: often the average of the upper and lower bands.
A key point for a worked example is that the indicator is a calculation on historical data, not a prediction. The bands update as new highs and lows enter the rolling window and older values leave.
Worked example with fully stated assumptions
Assumptions (so you can verify every step)
- We use a lookback window length of 3 periods (commonly called “N=3”).
- We have one series of prices where each period has an observed High and Low.
- We compute the bands using the exact raw highs and lows for each period.
- We compute the midline as (Upper + Lower) / 2.
- We do not assume any real-time updates; we only compute bands for a fixed historical set.
Input data
Assume the following 6 periods of High/Low values:
- Period 1: High 1.20, Low 1.10
- Period 2: High 1.25, Low 1.15
- Period 3: High 1.22, Low 1.12
- Period 4: High 1.30, Low 1.14
- Period 5: High 1.28, Low 1.08
- Period 6: High 1.26, Low 1.11
Step-by-step calculations (N=3)
By definition, you can compute bands starting at Period 3 (because you need 3 periods of history).
At Period 3 (periods 1–3):
- Upper band = max(1.20, 1.25, 1.22) = 1.25
- Lower band = min(1.10, 1.15, 1.12) = 1.10
- Midline = (1.25 + 1.10) / 2 = 1.175
At Period 4 (periods 2–4):
- Upper band = max(1.25, 1.22, 1.30) = 1.30
- Lower band = min(1.15, 1.12, 1.14) = 1.12
- Midline = (1.30 + 1.12) / 2 = 1.21
At Period 5 (periods 3–5):
- Upper band = max(1.22, 1.30, 1.28) = 1.30
- Lower band = min(1.12, 1.14, 1.08) = 1.08
- Midline = (1.30 + 1.08) / 2 = 1.19
At Period 6 (periods 4–6):
- Upper band = max(1.30, 1.28, 1.26) = 1.30
- Lower band = min(1.14, 1.08, 1.11) = 1.08
- Midline = (1.30 + 1.08) / 2 = 1.19
What you should notice
- The upper band can stay unchanged when the new period does not create a higher high within the rolling window.
- The lower band can move downward quickly when a new period introduces a new low.
- The midline shifts according to the upper and lower changes, not directly to the current price.
Limitations and how the worked example could fail in practice
- Data handling and definitions vary. Some platforms may use different “price” inputs (for example, whether highs/lows are based on bid/ask conventions or how candles are formed). If your input definitions differ, your computed bands will differ.
- Window choice changes behavior. A short lookback reacts quickly to new extremes; a long lookback smooths extremes but can lag. The same market data can produce very different band widths purely due to N.
- Band width is not an outcome forecast. Donchian Channels measure recent extremes; they do not guarantee that future highs or lows will occur. Any claimed relationship to future returns depends on context and cannot be assumed from one example.
- Regime changes and range compression. If markets enter flat or trending conditions, the rolling highest high / lowest low may become persistent (as in the upper band staying at 1.30 for multiple periods). This can reduce informational value.
- Costs and execution uncertainty. Even if an analyst uses bands alongside trade management rules, real outcomes can be affected by spreads, slippage, and platform execution. Those effects are not included in the indicator calculation.
Verification and next question
To independently verify the worked example, redo the rolling computations exactly as stated:
- For each target period, list the Highs and Lows for the last N periods. - Compute Upper = maximum of those Highs and Lower = minimum of those Lows.