Donchian Channel Calculator
Technical indicators
- Donchian channel: the window's extremes are 180 and 150, so the channel is 30 wide.
- Midline: (180 + 150) / 2 = 165.00 - the breakout reference of the Turtle rules.
- The close at 172 has covered 0.73 of the channel from the low.
- Donchian result: bands 150 / 165.00 / 180, close at position 0.73.
The Donchian channel is the simplest envelope in technical analysis: it draws the trading range itself. This donchian channel calculator takes the highest high and the lowest low of your window, plus the latest close, and returns the midline, the upper band, the channel width and the close's position inside the channel. There is no smoothing, no weighting and no volatility adjustment — the bands are the extremes, exactly as printed.
That simplicity is the point. Richard Donchian built the channel to answer one question: is price doing something it has not done at any point in the window? A close, or in stricter systems a print, beyond the upper band is a new highest high for the whole period, and a break of the lower band is a new lowest low. Those events are unambiguous, which is why the channel later became the entry framework behind the Turtle trading rules, the most famous trend-following experiment ever run.
The midline — the plain average of the two extremes — gives the channel its reference point, and the close position expresses where the latest price sits between the low and the high as a fraction of the width. Together the four outputs describe a window completely: how wide the range is, where its centre lies, and whether the latest close is hugging the low, parked in the middle or pressing against the high.
Worked examples
Window 180 / 150, close 172
(180 · 150 · 172)
| Midline | 165.00 |
| Upper band (highest high) | 180.00 |
| Channel width | 30.00 |
| Close position in channel | 0.73 |
Window 96 / 80, close 81
(96 · 80 · 81)
| Midline | 88.00 |
| Upper band (highest high) | 96.00 |
| Channel width | 16.00 |
| Close position in channel | 0.06 |
Window 320 / 260, close 290
(320 · 260 · 290)
| Midline | 290.00 |
| Upper band (highest high) | 320.00 |
| Channel width | 60.00 |
| Close position in channel | 0.50 |
The channel that is just the range
The Donchian channel is the window's trading range itself: highest high, lowest low and their midpoint. Every other channel in common use modifies the range somehow — smoothing it, centring it on an average of closes, or scaling it by volatility. Donchian's version refuses all of that. The upper band is the highest high because that is the price above which no trade in the window has occurred, and the lower band is the lowest low for the mirror-image reason. The bands are facts about the window, not estimates.
This has a consequence traders either love or hate: the bands are step functions. A band stays perfectly flat until a new extreme prints, then jumps to the new level and stays there until that extreme ages out of the window. There is no gradual drift to hide behind. When the upper band moves, it moves because price genuinely made a new high, and when it drops, it drops because the old high left the window — both events are visible on the chart and both mean something specific.
The calculator needs only the two extremes to draw the whole structure, because everything else is arithmetic on them. The midline is their average, the width is their difference, and the close position locates the latest close within the span they define. Feed in the extremes of whatever window your system uses, and the four outputs give you the complete geometry of that window in one pass.
- Upper band: the highest high of the window, unadjusted
- Lower band: the lowest low of the window, unadjusted
- Midline: the simple average of the two extremes
- Channel width: highest high minus lowest low
- Close position: the close's distance from the low, as a fraction of the width
Worked examples: three windows
The first example uses the calculator's defaults: a highest high of 180, a lowest low of 150 and a close of 172. The channel is 30 wide, the midline is (180 + 150) / 2 = 165.00, and the close at 172 has covered 0.73 of the channel from the low. That is a strong configuration: the close sits in the upper reaches of the range, much nearer the highest high than the lowest low, with the midline well beneath it. The full result reads: bands 150 / 165.00 / 180, close at position 0.73.
The second example is a quieter, weaker window: a highest high of 96, a lowest low of 80 and a close of 81. The channel is 16 wide and the midline is (96 + 80) / 2 = 88.00. The close at 81 has covered only 0.06 of the channel from the low — it is hugging the bottom of the range, barely above the lowest low itself. The full result reads: bands 80 / 88.00 / 96, close at position 0.06. Where the first example presses the top of its range, this one presses the bottom, and the position reading makes the contrast impossible to miss.
The third example is the balanced case: a highest high of 320, a lowest low of 260 and a close of 290. The channel is 60 wide, the midline is (320 + 260) / 2 = 290.00, and the close at 290 has covered 0.50 of the channel from the low — exactly halfway, sitting precisely on the midline. The full result reads: bands 260 / 290.00 / 320, close at position 0.50. A close at the exact centre of a wide channel is the neutral configuration: the window's range is large, but the latest price commits to neither edge of it.
| Highest high | Lowest low | Midline | Upper band (highest high) | Channel width | Close | Close position in channel |
|---|---|---|---|---|---|---|
| 180 | 150 | 165.00 | 180.00 | 30.00 | 172 | 0.73 |
| 96 | 80 | 88.00 | 96.00 | 16.00 | 81 | 0.06 |
| 320 | 260 | 290.00 | 320.00 | 60.00 | 290 | 0.50 |
Midline as trend reference
The midline earns its place in the output because it converts the channel from a breakout detector into a trend reference. A close above the midline has, by definition, recovered more than half of the window's entire range from the low; a close below it has surrendered more than half. That halfway test is crude, but it is honest, and it divides the three examples cleanly: the first example's close at position 0.73 sits comfortably above its midline of 165.00, the second example's close at position 0.06 sits far below its midline of 88.00, and the third example's close sits on its midline of 290.00 exactly.
Position readings near the centre deserve respect rather than dismissal. A close at 0.50 in a channel 60.00 wide, as in the third example, means price has travelled a long way from both extremes without reaching either — the market is inside its range, not at an edge of it, and breakout logic has nothing to say until that changes. Traders who force a directional opinion at mid-channel are usually trading their hopes; the position number exists partly to tell them so.
The midline also steadies the interpretation of width. A channel width of 30.00 in the first example and 60.00 in the third describe very different amounts of room to move, even when the position readings are compared across them. Reading width, midline and position together — which is exactly the set this calculator returns — stops the common error of treating a close near a band as equally significant in a narrow, sleepy range and in a wide, active one.
Breakouts and the Turtle rules
Richard Donchian's bands became the entry rules of the Turtle traders: break the band, take the trade. The logic is austere. If price prints above the highest high of the window, every shorter-term reference has been exceeded and the uptrend has objective confirmation; if it prints below the lowest low, the downtrend has. The Turtles built a complete trend-following system on that trigger, and the channel's refusal to smooth or predict is precisely what made the rule robust enough to teach to novices and run as an experiment.
The breakout definition is worth stating exactly, because the calculator's outputs make it concrete. In the first example, a print above 180.00 is a breakout to the upside and a print below 150.00 is a breakdown, because those are the window's extremes — there is no buffer, no percentage filter and no ambiguity about whether the event happened. In the second example the corresponding triggers are a print above 96.00 or below 80, and in the third, above 320.00 or below 260. The bands are the signal levels, stated in advance.
Breakout systems pay for their clarity with whipsaws: ranges produce false breaks, and a close at position 0.06 or 0.73 can reverse long before it reaches the far band. That is a property of markets, not a defect of the channel, and the position reading helps manage it — a close already deep in the channel has less room to run before it meets the opposite extreme than a close just crossing the midline. Used with that awareness, this donchian channel calculator gives you the complete geometry of any window in seconds: the bands that define a breakout, the midline that divides the range, the width that sizes the opportunity, and the position that tells you where price stands right now.
FAQs
What midline does a 180 / 150 window give?
165.00. The midline is the plain average of the two extremes: (180 + 150) / 2 = 165.00. It is not a moving average of closes and it does not weight recent bars more heavily — it is simply the centre of the window's range, and it stays fixed until a new extreme moves one of the bands.
How wide is that channel?
30.00. The channel width is the highest high minus the lowest low, 180 - 150 = 30.00, and that width is also the measuring stick for the close position: every position reading divides the close's distance from the low by this width, so the width quietly underpins every other number the calculator returns.
A 96 / 80 window?
Midline 88.00, width 16.00. The extremes average to (96 + 80) / 2 = 88.00 and the range spans 96 - 80 = 16.00. With the close at 81 in that example, the position reading comes out at 0.06, because the close has barely lifted off the lowest low at the bottom of the channel.
Where does a close of 172 sit in the first channel?
Position 0.73 from the low. The close has covered most of the channel's width of 30.00, travelling from the lowest low at 150 up toward the highest high at 180, and stopping at 172 leaves it in the upper region of the channel — close to the upper band, which is exactly where breakout watchers focus their attention.
A 320 / 260 window with close 290?
Midline 290.00 and position 0.50 - dead centre. The extremes average to (320 + 260) / 2 = 290.00, the close is also 290, and a close equal to the midline always reads exactly halfway up the channel. It is the neutral configuration: price sits at the balance point of the entire window's range.
What breaks the channel?
A print above 180.00 or below 150.00 in the first example. The bands are the window's own extremes, so any trade beyond them is by definition a new highest high or lowest low for the window. That is the whole breakout logic of the channel: the bands do not predict the break, they define precisely what counts as one.