APPLIED STUDY · ORIGINAL LESSON
Learning plan and prerequisites
Before you begin: Understand rolling windows, highs/lows and completed-bar signals.
- Compute rolling extreme boundaries
- Distinguish display and signal windows
- Handle old extremes leaving the window
Mechanism and interpretation
A Donchian channel takes the highest high and lowest low over a declared window; its midpoint averages those boundaries. This is an extreme-based envelope, unlike a standard-deviation or ATR envelope. Its width changes when a new extreme enters or an old extreme leaves the window. The upper boundary can fall without a new decline in the latest bar simply because an old high expires from the lookback.
For breakout research, specify whether the current bar is included. A displayed channel including the current high cannot be exceeded by that same bar's close when valid OHLC satisfies close≤high. A close-above-prior-channel rule therefore compares today's close with a channel built from earlier bars. This one-bar lag is a causal alignment choice, not a cosmetic plotting offset. Keep the calculation timestamp and the plotted timestamp separate if the display is shifted.
Worked case — synthetic data
Synthetic prior-window highs are 100,102,101 and lows 95,97,96. The prior channel is [95,102], midpoint 98.5. The next bar has H=104, L=99, C=103. Its close exceeds the prior upper boundary 102, so a close-above-prior-channel event occurs. If the same bar is included in the channel calculation, the upper boundary becomes 104 and the close 103 does not exceed it. The two tests answer different questions.
Now consider a five-bar upper-boundary window whose highs are 120,110,112,111,113. Its upper edge is 120. If a new high 114 enters and the old 120 leaves, the new edge is 114, even though the latest high is above the preceding bar's 113. A downward change in the channel edge is therefore not automatically a fresh bearish price event. It may be a window-expiry effect.
Context and failure modes
Longer windows usually retain extremes longer but do not guarantee stronger predictions. Equal highs require a clear event convention so repeated touches are not counted as repeated new breakouts. Corporate actions and bad prints can dominate an extreme-based indicator until the affected observation leaves. Check data quality before interpreting an unusually wide channel.
Practice task
Prior highs are 50,53,52 and lows 47,49,48. A new bar has high 54 and close 53.5. Calculate the prior channel and midpoint, then compare the close with the prior upper boundary and the current-inclusive upper boundary.
Worked practice answer
Prior channel is[47,53] and midpoint 50. The close 53.5 is above 53, so a prior-window breakout qualifies. The current-inclusive upper boundary is 54, so the close does not exceed it. A valid bar's close remains at or below its own high.