Donchian Trend Rules
Donchian Trend Rules are the mechanical trend-following rules built on channel breakouts: go long when price makes a new N-period high, and exit or reverse when it makes a new M-period low (mirrored for shorts). They are Trend concepts. The Library holds 1 implementation, ready to run on Vela.
Top Donchian Trend Rules indicator
The top custom implementation, built on the original standard Donchian Trend Rules formula.
1 total
Open the Donchian Trend Rules implementation below on Vela, then have Quant, our coding agent, turn it into a strategy you can backtest.
What are Donchian Trend Rules?
Donchian Trend Rules are the mechanical trend-following rules built on channel breakouts: go long when price makes a new N-period high, and exit or reverse when it makes a new M-period low (mirrored for shorts). The levels come from Donchian Channels, which plot the highest high and lowest low of a lookback window. Richard Donchian, widely regarded as the father of trend following, traded the canonical form in the 1950s and 60s as the weekly rule: buy a breakout above the prior four weeks' high, sell below the prior four weeks' low, always in the market.
The design choice that distinguishes the later variants is asymmetric lookbacks. A longer entry channel (20 or 55 days in the Turtle variants taught by Richard Dennis and William Eckhardt) demands a meaningful new extreme before committing, while a shorter exit channel (10 or 20 days) surrenders less open profit when the trend ends. The rules do not predict; they participate. They accept frequent small whipsaw losses in ranging markets in exchange for holding through the occasional extended trend, so risk sizing and diversification carry as much weight as the signal itself.
How to apply Donchian Trend Rules
The rules are fully mechanical, which makes them unambiguous to backtest. A standard long-side pass looks like this (shorts mirror it):
- 1Pick an entry lookback N and plot the channel: the highest high and lowest low of the last N completed bars. Donchian's weekly rule used four weeks; the documented Turtle systems used 20-day and 55-day entries.
- 2Define the trigger. Decide in advance whether an intrabar touch of the upper band or a close beyond it constitutes the breakout, then enter long when it happens. Using the prior bar's channel avoids triggering on a level the current bar itself is creating.
- 3Exit on the opposite extreme of a shorter window M: for example, a 20-day entry paired with a 10-day-low exit. Some variants reverse into a short at the same point rather than going flat.
- 4Add the risk layer: an initial stop (the published Turtle rules placed it two ATR units from entry) and position sizing scaled to ATR, since raw channel breakouts fail often when the market is ranging.
How it's calculated
Donchian channel breakout rules: a new n-bar high opens or maintains a long trend, a new n-bar low a short trend.
Richard Donchian's four-week rule is the 20-day version run as stop-and-reverse; the Turtle rules pair a 20-day entry with a 10-day exit (System 1) and a 55-day entry with a 20-day exit (System 2).
Bands here use the prior n bars so a breakout is well defined; plotted Donchian channels often include the current bar.
Some versions trigger intrabar when the high or low touches the band instead of waiting for the close.
How traders use it
- As a complete always-in or long-flat system: enter on the N-period breakout, exit on the shorter opposite-extreme break, and take every signal, since skipping one can mean missing the rare trend that would have offset a long run of small whipsaw losses.
- As a standalone trailing exit: the lower band of a short-lookback channel works as a trailing stop for longs regardless of how the trade was entered, one of the classic options in the trailing method taxonomy.
- As a trend filter: whether the most recent N-period breakout was up or down classifies market direction (a simple trend regime label) that can gate entries from other tools.
- As a scan: fresh 20-day or 55-day highs and lows across a watchlist surface the symbols where a Donchian-style entry is currently live.
Donchian Trend Rules vs similar concepts
Donchian Channels: The channel is the indicator; the trend rules are the trading logic on top. You can plot the channel purely as support and resistance, while the rules add which band triggers entry, which shorter band exits, and what happens between signals.
Supertrend: Both flip between bullish and bearish regimes, but Supertrend flips when price crosses an ATR-based band around a midpoint, while Donchian rules trigger only on a new N-period extreme. Donchian entries need a fresh high or low; Supertrend can flip inside the prior range.
Turtle Soup: The deliberate fade of these rules. Turtle Soup sells a failed 20-day breakout back into the range, betting the new extreme is a false breakout rather than the start of a trend. Same level, opposite thesis.
Donchian Trend Rules FAQ
Turn Donchian Trend Rules into a trading strategy.
Open the implementation from this page in Vela. Quant, our coding agent, builds the strategy with you and backtests it on real data.
Browse this familyTrend104 concepts mapped · 104 in the Library
- Adaptive-lookback MA
- ADX / DMI System
- Alligator
- ALMA
- Anchored MA
- Andrews' Pitchfork
- Aroon
- ATR Trailing Regime
- Bessel Filter
- Breakout
- Butterworth Filter
- Chande Kroll Stop
- Chandelier Stop
- Chebyshev Filters
- Climactic Moves
- Continuation
- Coral Trend
- Correlation Trend Indicator
- Death Cross
- DEMA
- Displaced MA
- Donchian Trend Rules
- Dynamic S/R Via MA
- Ehlers Instantaneous Trendline
- Ehlers SuperSmoother
- Elastic Volume-weighted MA
- Elliptic Filter
- EMA
- Fan Principle
- FRAMA
- Gann Box
- Gann Fan & Angles
- Gann HiLo Activator
- Gann Method
- Gann Square of 9
- Gaussian Filter
- Geometric MA
- Golden Cross
- Guppy GMMA
- Halftrend
- Harmonic MA
- Higher-timeframe Trend Filter
- HMA
- Ichimoku Signals
- Ichimoku System
- Ichimoku Theories
- JMA
- KAMA
- Kaufman Efficiency Ratio
- Laguerre Filter
- Linear-regression Channel
- LSMA
- MA Envelope
- MA of MA
- MA Ribbon
- MA Slope Filter
- MAMA/FAMA
- McGinley Dynamic
- MLMA
- Moving Average Crossovers
- NRTR
- Order-statistic Filters
- Parabolic SAR
- Parallel Channel
- Polynomial Regression Band
- Pullback
- R-squared Trend Fit
- Rainbow MA Stack
- Random Walk Index
- Range Filter
- Retest
- Reversal
- RMA
- Savitzky-Golay Filter
- Sine-weighted MA
- SMA
- Speed Resistance Lines
- Standard-error Channel
- Supertrend
- Swiss Army Knife Filter
- SWMA
- T3
- TEMA
- TRAMA
- Trend Acceleration/inflection
- Trend Exhaustion
- Trend Intensity Index
- Trend Magic
- Trend Regime Label
- Trend-quality Composites
- Trendline
- Triangular MA
- UHL Adaptive MA
- Ultimate Smoother
- Vertical Horizontal Filter
- VIDYA
- Volume-adjusted MA
- Vortex
- VWMA
- Weinstein Stage Analysis
- Whittaker–Henderson Smoother
- Windowed FIR Smoothing
- WMA
- ZLEMA
