Donchian Channel Calculator
Calculate rolling highest-high and lowest-low channel boundaries from entered bars, with midpoint, width, source indices and every completed window exposed.
Enter one period and ordered high-low bars
Each boundary uses the current completed row and previous period minus one rows.
One completed bar per line. High must be at least low.
Latest Donchian window
Entered Supplemental Indicators 1.0.0.
| Label | Index | High | Low | Window start | Upper | Lower | Midpoint | Width | Upper index | Lower index | State |
|---|
How the Donchian Channel is calculated
Lower = lowest low in the current N-row window
Midpoint = (upper + lower) ÷ 2
Width = upper − lower
Version 1.0.0 uses the classic highest-high and lowest-low channel with the current completed row included. The first window reports at zero-based index N − 1.
The table identifies the most recent row that supplied each equal extreme. No current close is entered, so the calculator cannot and does not classify a boundary crossing.
Assumptions and limits
- Period must be an integer from 2 to 200.
- At least one complete period of ordered high-low bars is required.
- Rows must be oldest to newest and come from one symbol, timeframe and feed.
- Other implementations can exclude the current bar, apply a chart shift or use close prices.
- Breakout, support, resistance, trend, entry, stop and exit interpretations are withheld.
Worked example from the audited fixture
How to interpret the result
These boundaries summarize only the entered high-low window. Because no current close is entered, the tool cannot determine whether price touched or crossed either boundary. Width 8 is a price-unit span, not a volatility forecast.
Frequently asked questions
- Enter a period and at least that many ordered high-low bars from one symbol, timeframe and feed.
- It is the highest high in the current period-bar window.
- It is the lowest low in the current period-bar window.
- Midpoint is upper plus lower divided by two, and width is upper minus lower.
- Yes. Version 1.0.0 includes the current completed row and previous period minus one rows.
- The numeric boundary is unchanged, and the table attributes it to the most recent equal-extreme row.
- Only when the same high-low prices, period, inclusive current row, zero chart shift and history boundary are used.
- No. Breakout, support, resistance, trend, entry, stop and exit labels are withheld.
Sources and methodology
- MetaQuotes Code Base — CDonchian — Published classic Donchian high/low channel implementation.
- MQL5 Article — Trading with Donchian Channels — Platform implementation context and limitations of channel-only interpretation.
Continue entered range analysis
Compare the chart feed and trading terms
Use one broker feed, symbol and timeframe for every entered observation, and compare the source history with your terminal before relying on a platform match.
Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and broker entity.

