Donchian Trend Rules
By LuxAlgoMay 29, 2026
Donchian Trend Rules runs the mechanical breakout system on the chart: long on a break of the prior 20-bar high, out on a break of the prior 10-bar low, mirrored for shorts, all sequenced through an explicit position state. The clean build of the Donchian trend rules, it draws the entry channel with a gradient fill, trails the exit level with the open position, and prints one entry marker per trade — nothing reprints until its exit.
How to Trade the Donchian Trend Rules?
- Long Entry triangle: the trigger cleared the prior entry-channel high; the mirrored breakdown opens shorts.
- Trailing Exit Level: the opposite extreme of the exit channel — its break closes the trade, and the line doubles as a standalone trailing stop.
- Direct reversals: in Long & Short mode an opposite entry signal flips the position without waiting for the exit rule.
- Regime as filter: the +1 / 0 / -1 position state (and optional bar coloring) can filter entries from other tools.
Setting the exit equal to the entry recreates the always-in four-week rule; expect frequent small whipsaws in ranges in exchange for the occasional long ride.
Donchian Trend Rules Settings
- Entry Length (default 20): lookback of the entry channel; a breakout beyond a band opens a position.
- Exit Length (default 10): lookback of the exit channel — a shorter window gives back less of the move when it reverses.
- Breakout Trigger (default Close): a close beyond the band, or Intrabar Touch as soon as a wick penetrates it.
- Trade Direction (default Long & Short): both sides with direct reversals, or one-sided modes that go flat on the exit rule.
- Show Entry Channel, Show Trailing Exit Level, Show Signal Markers (all enabled), and Color Bars by Regime (disabled) select the display.
Frequently Asked Questions
How does this differ from plain Donchian Channels?
Donchian Channels draw the levels; this build trades them. It adds asymmetric entry/exit lookbacks, a state machine sequencing one entry per trade, the trailing exit plot, and direction modes — the system rather than the geometry.
Why did a touch of the band not open a trade?
The default Breakout Trigger is Close, so a wick through the band does nothing; the channels are also built from prior bars only, so a bar never breaks a level it is itself creating. Switch to Intrabar Touch for the faster convention.
Which lengths should I use?
20/10 and 55/20 are the documented pairings — tactical and campaign — and the defaults give the first. A longer entry demands more proof, a shorter exit protects more open profit, and equal lengths produce a stop-and-reverse system.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
