A Donchian channel trend strategy follows the oldest breakout idea in technical analysis: draw a line at the highest high of the last N candles and another at the lowest low, then treat a close beyond one of them as a statement that price has left its recent range. This free guide, which you can read with no sign-up, turns that idea into a written rulebook: which lookback to start with, why the exit channel is shorter than the entry channel, how to deal with the many false starts a breakout method produces, and how to test the whole thing on your own charts before risking anything. It is a trend-following method, so it spends long stretches being wrong in small ways. That is part of how it is built, not a defect to be tuned away.
What a Donchian channel is
A Donchian channel has three lines. The upper line is the highest high of the last N completed candles. The lower line is the lowest low of the last N completed candles. The middle line, if you show it, is the average of the two. Nothing is smoothed and nothing is weighted: the channel is just the edge of the recent range, redrawn on every candle. When price makes a new N-candle high, the upper line steps up to meet it. When price drifts sideways, the lines stay flat and the channel narrows to the real width of the range.
That plainness is the point. A moving average describes the average location of price. A Donchian line describes the extreme, and extremes are what breakout traders care about. The method is named after Richard Donchian, a pioneer of trend following, and the version most people have heard of is the 20-day entry and 10-day exit often attached to a famous trend-following experiment. This guide does not claim any rule set will repeat past results. It uses those numbers as a starting point because they are widely documented, easy to remember, and give you something concrete to test.
The difference between a Donchian breakout and a simple “price broke resistance” idea is that the Donchian version is mechanical. There is no judging whether a level looked important. The question is only whether the close is beyond the highest high or lowest low of a fixed window. Written that way, the method can be tested, and the test will tell you more than any opinion about it.
Market conditions it suits
Breakout trend following needs a market that sometimes moves a long way in one direction. Forex majors, equity indices, large crypto pairs and commodities all do this at times, usually on the 4-hour, daily and weekly charts. It does badly in a market that spends weeks oscillating inside a band: price pokes above the upper line, closes there, then falls back into the range, and each poke is a small loss. A trend-following method accepts a run of those small losses as the cost of being in position when a real move happens, but you should decide in advance how many of them you can sit through.
That is why the method pairs well with a simple regime question before you start. If the daily chart has been inside the same band for two months, a 20-candle breakout of that band is a bigger statement than a 20-candle breakout in the middle of a choppy week. Likewise, if the channel is very narrow compared with the 14-period ATR, a close beyond it is not much of an event. The trend versus range strategy guide covers the classification step in more depth, and the market regime check article explains why it is worth doing before choosing a method at all.
Time of day matters less here than for intraday plans, because the method usually works on closed 4-hour or daily candles. If you do run it on a lower timeframe, label the session in your journal in Sydney time so you can see whether the false breakouts cluster in the thin hours.
The rules, written out
Here is a complete starting rule set for a long-and-short, closed-candle Donchian trend strategy on the daily or 4-hour chart. Change one number at a time, and only in a test, never in the middle of a trade.
- Entry channel. Use 20 candles. A long idea exists when a candle closes above the highest high of the previous 20 completed candles (not including the candle itself). A short idea exists when a candle closes below the lowest low of the previous 20.
- Exit channel. Use 10 candles. A long is over when a candle closes below the lowest low of the previous 10 candles. A short is over when a candle closes above the highest high of the previous 10.
- Initial stop. Place it at two times the 14-period ATR from the entry price, or at the opposite side of the entry channel, whichever is closer. Write the number down before the entry.
- Position size. Risk a fixed fraction of the account to the initial stop. A wider stop means a smaller position, never the other way around.
- No re-entry rule. If a trade exits through the 10-candle channel, the next entry is the next fresh 20-candle breakout in either direction. Do not re-enter at the same level “because it came back”.
Note the word “previous” in the first rule. If the channel includes the current candle, the close can never be above the upper line, because the line has already moved up with it. Many beginners are confused by a Donchian indicator that never seems to be broken for exactly that reason. On TradingView, the built-in Donchian Channels indicator draws the lines including the current candle, so the breakout test is a comparison with the line’s value on the previous candle. Hold that in mind when you read the chart.
Why the exit channel is shorter
The two-channel structure is the least obvious and most important part of the design. A trend-following entry has to be selective, because a breakout of a short window happens all the time. A longer entry window (20) filters out minor moves. The exit has the opposite job: it needs to be responsive enough to protect most of an open gain when the trend stops. A shorter window (10) trails the move more closely, so a pullback that takes out the 10-candle low ends the trade, while a shallow dip does not.
The cost of this design is giveback. A trade that runs a long way and then turns will return a meaningful part of its open gain before the exit triggers, because the 10-candle low sits well below the current price. You can tighten the exit (say, 7 candles) to reduce giveback, but then more trades are shaken out by ordinary pullbacks in the middle of a trend, and you pay spread and slippage more often. There is no number that removes the trade-off. What the test on your own data can show you is which side of it you are more comfortable with.
A common alternative is to exit on a multiple of ATR trailed from the highest close since entry. That is the idea behind the volatility-adjusted trailing path guide. The two approaches can be compared by running both over the same history and reading the journal columns side by side.
Worked example (illustrative numbers, a daily chart of a major index)
The prices below are illustrative and not a record of a trade. They show the arithmetic of the rules, not an outcome.
| Step | Reading | Result |
|---|---|---|
| Regime check | The index has traded between 4,700 and 4,950 for about nine weeks. The 14-day ATR is 48 points. | Range of about five ATRs. A break would be meaningful. |
| Entry channel | Highest high of the previous 20 daily candles is 4,950. Today closes at 4,968. | Close above the upper line. Long idea exists. |
| Initial stop | Two ATRs is 96 points, so 4,872. The opposite channel side is 4,700, which is further away. | Stop at 4,872. Risk is 96 points. |
| Size | Account risk fixed at a small fraction. Position size is that amount divided by 96 points. | Calculated before entering. |
| Management | Twelve candles later the 10-day low is 5,040 and price is at 5,120. The stop has been replaced by the exit channel because it is higher than the initial stop. | Exit level 5,040. |
| Exit | A later candle closes at 5,031, below the 10-day low. | Trade is over. Result is recorded in R. |
In this example the trade gives back from a high of 5,120 to an exit near 5,031, and still finishes with a gain in R terms. The same rules, applied to a false breakout, would have ended after a close below 4,872 or below the 10-day low, whichever was higher. Both are normal outcomes of one set of rules. The thing to record is whether the rules were followed, not whether each trade pleased you.
Common mistakes
- Including the current candle in the lookback. Then no close can ever break the channel, or the test is silently shifted by one candle.
- Entering on a wick. A candle that trades above the upper line and closes back inside is not a breakout in this guide. Use closes.
- Moving the exit channel because a trade is going well. Changing 10 to 5 after a good run is a decision about your feelings, not about the market.
- Abandoning the method after three small losses. Trend following produces clusters of small losses. Judging it on ten trades is judging it on noise. Decide the minimum sample before you start.
- Trading it on a market you have not studied. Some instruments gap overnight, so a stop at 96 points may fill 150 points away. Check how your instrument behaves around the daily open.
- Stacking correlated positions. Long on three equity indices after the same breakout is one bet taken three times.
Variations
Longer windows. A 55-candle entry with a 20-candle exit is the other classic pairing. It trades less often and waits for bigger ranges to break. The tradeoff is larger initial risk and slower exits.
A trend filter. Only take longs when price is above its 200 EMA and shorts when it is below. This removes counter-trend breakouts, at the cost of missing early reversals. The 20/50/200 EMA stack guide describes the filter in detail.
A width gate. Skip a breakout if the entry channel is narrower than, say, 1.5 ATR, because a break of a tiny range tells you little.
Long-only. Some markets, such as equity indices, have a long-run drift that makes the short side behave differently from the long side. Keep separate journal columns for each direction before deciding to drop one.
Next-candle entry. Waiting for the next candle to open, rather than acting on the close itself, matches how many people actually trade a daily method. Log the difference between the close price and the next open so you can see its cost.
How to study and test it yourself
Before putting anything at risk, test the rules on history. Pick one instrument and one timeframe. Scroll back at least two years on the daily chart, or about six months on the 4-hour chart. Write every entry, stop, exit and result in a spreadsheet, using R multiples (the gain or loss divided by the initial risk) so that trades of different sizes can be compared. Then do three things. First, count the trades and the longest run of consecutive losers, because that run is what you will actually have to sit through. Second, look at the average R of winners and losers separately, because a trend method typically has many small losers and a few large winners, and the shape matters more than any single average. Third, check that the result does not depend on one single trade: remove the best trade and see what is left.
Then repeat on a second instrument you did not look at while designing the rules. If the method only makes sense on one chart, it is a description of that chart, not a method. None of this predicts the future. It tells you what the rules would have felt like, which is exactly the experience you need before sizing real money.
Read the risk-reward ratio page next if you want to see why a low-frequency, large-winner profile has to be judged on a different scale from a high-frequency one, and the ATR stop loss guide for the stop arithmetic used above.
How to apply it on TradingView
Open the chart and add the built-in Donchian Channels indicator from the Indicators menu. Its default length is 20, which matches the entry channel. Add it a second time with a length of 10 and change its colors so that you can tell the two sets of lines apart. Add ATR with a length of 14 in a separate pane or in the status line. If you prefer to avoid the second copy, you can draw the exit level yourself from the 10-candle low each day, but two copies is simpler and less error-prone.
Use the replay tool to step through history one candle at a time: it hides future candles so you cannot cheat the lookback. Create an alert on the upper and lower entry lines, using “once per bar close”, following the TradingView alerts guide, and let the alert tell you to look at the chart rather than to act. Then do the checks above by eye: is the channel wide enough, which way is the 200 EMA sloping, and where is the initial stop?
If you later want help with the trending-or-ranging question, Apex Edge Regime Check classifies a chart as trending, ranging, volatile or quiet. It is paid and optional. Apex Edge Trend Path, a volatility-adjusted trailing path, is coming soon and is not for sale yet, so there is no buy button for it here. Nothing on this page needs either tool: the built-in Donchian Channels indicator and ATR are enough to practice every rule here.
Frequently asked questions
What is a Donchian channel strategy?
It is a breakout trend method. The channel is the highest high and lowest low of the last N candles. A close beyond it is the entry, and a close beyond a shorter channel on the other side is the exit.
Why is the exit channel shorter than the entry channel?
A long entry window filters out minor breakouts. A shorter exit window trails price more closely so a deeper pullback ends the trade. The cost is giveback at the turn, and shortening the exit further increases stop-outs in ordinary pullbacks.
Does the lookback include the current candle?
Not for the test in this guide. The channel is built from the previous candles, so a close can be compared with it. TradingView’s indicator includes the current candle, so compare the close with the line’s previous value.
What if the market is range-bound?
Breakout methods produce clusters of small losses in ranges. Decide in advance how many you can sit through, and use a regime check before starting.
Do I need a paid indicator?
No. The built-in Donchian Channels indicator and ATR are enough. Paid tools are optional. This guide is free to read with no sign-up.
Is this a trade recommendation?
No. This is general education. Examples use illustrative numbers. Education only. Not financial advice. Trading involves risk of loss.
Keep reading
Supertrend strategy
An ATR-based trailing line as an alternative exit.
Volatility-adjusted trailing path
Compare exit paths on the same entries.
Trend versus range strategy
The regime check to run before a breakout method.
More in trading strategies (free to read, no sign-up), or browse all guides by topic. Questions? Email contact@brainiosoftware.com.
General information only. This guide is general education, not personal financial product advice or a recommendation to buy or sell anything. Indicator readings, alerts and screener results are not trade recommendations. Examples use illustrative numbers. TradingView is a third-party platform; we are not affiliated with or endorsed by TradingView. Education only. Not financial advice. Trading involves risk of loss. Read the full risk disclaimer.