All indicators

Donchian Trend Rules

By LuxAlgoMay 29, 2026

Static chart image

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

Original indicatorBuilt in-house by LuxAlgo

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.