Join waitlist
Strategies / Breakout / Donchian Breakout Trendline Crossover

Donchian Breakout Trendline Crossover

The system draws a resistance line from a new 60-bar high that falls over time and buys when price closes above it. It mirrors this with a rising support line from a new 60-bar low and sells short when price closes below it.

BreakoutLong & shortSwingUSD/JPYDaily
2.06Profit factor
3,189,270Net profit USD
34.91%Win rate
338Trades
-264,620Max drawdown
9,436Avg trade

Best run of 14. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:1.

Entry rules, long

  1. A bar sets a new 60-bar high and the next bar fails to, so its high starts a resistance line.
  2. The resistance line falls each bar by 0.03 times twice the 14-period ATR measured at the breakout bar.

Entry rules, short

  1. A bar sets a new 60-bar low and the next bar fails to, so its low starts a support line.
  2. The support line rises each bar by 0.03 times twice the 14-period ATR measured at the breakdown bar.

Exit rules

  1. A short closes when the close crosses above the midpoint of the 60-bar high and low range, unless it crosses above the resistance line.

Test conditions

PeriodUp to 2026-10-12
InstrumentUSD/JPY, Daily
Spread1 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily2.06 33834.913,189,270 USD-264,620
EUR/USDDailyn/a 31634.18144,662 USD-47,516
Nikkei 225Dailyn/a 27731.4136,984 USD-22,293
GBP/USDDailyn/a 37435.5619,507 USD-7,099
Brent CrudeDailyn/a 13436.5714,035 EUR-9,538
US Crude OilDailyn/a 30833.4413,514 EUR-9,044
Nasdaq 100Dailyn/a 26234.7310,243 EUR-4,946
Nasdaq 1001 hourn/a 2,90429.689,279 EUR-6,508
DAX 4030 minn/a 5,04230.668,991 EUR-4,141
DAX 40Dailyn/a 31333.878,746 EUR-6,719
Gold30 minn/a 5,17931.262,483 EUR-875
GoldDailyn/a 37232.801,885 EUR-1,627
Gold4 hoursn/a 72031.671,844 EUR-1,105
Gold1 hourn/a 2,98030.131,396 EUR-858

Charts

Results by run

Top 10 of 14 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Donchian Breakout Trendline Crossover
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE longh = 0
ONCE shorth = 0
ONCE phline = 0
ONCE plline = 0
ONCE phok = 0
ONCE plok = 0
ONCE longtrprev = 0
ONCE shorttrprev = 0

dtop = highest[60](high)
dbot = lowest[60](low)
dmid = (dtop + dbot) / 2
myAtr = AverageTrueRange[14](close)

60 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

Donchian ChannelATR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Donchian Breakout Trendline Crossover in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 14 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 2.06 over 338 trades.

How large was the drawdown?

The best run had a maximum drawdown of 264,620 USD at the tested position size, against a net result of 3,189,270 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Turtle Trade

Uses the same indicator.

2.42 PF · 6,324 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

Donchian Breakout With ATR Line Exit

Also a breakout strategy.

2.03 PF · 208 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs