All Strategies
Breakout

Donchian Breakout

Buy the highest high of the last N bars — the original turtle-trader strategy.

Donchian breakouts buy when price closes above the N-bar high. It captures regime changes — the moment a market wakes up from a range. Fails in chop (every false breakout is a small loss) but the long tail of trending wins more than compensates. Most profitable on volatile assets like XAUUSD and crypto.

donchian-breakout.pinePine Script v5
//@version=5
strategy("Donchian Breakout", overlay=true)

entry_len = input.int(50, "Entry Lookback")
exit_len = input.int(25, "Exit Lookback")

highest_high = ta.highest(high, entry_len)
lowest_low = ta.lowest(low, exit_len)

if close > highest_high[1]
    strategy.entry("Long", strategy.long)

if close < lowest_low[1]
    strategy.close("Long")

Deploy Donchian Breakout as a Live Bot

Backtest on real data, then run it 24/7 on your MT5 account.

Get Started Free

We use cookies for analytics and ads measurement. See our privacy policy.