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.
Best run of 14. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:1.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, Daily |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 2.06 | 338 | 34.91 | 3,189,270 USD | -264,620 |
| EUR/USD | Daily | n/a | 316 | 34.18 | 144,662 USD | -47,516 |
| Nikkei 225 | Daily | n/a | 277 | 31.41 | 36,984 USD | -22,293 |
| GBP/USD | Daily | n/a | 374 | 35.56 | 19,507 USD | -7,099 |
| Brent Crude | Daily | n/a | 134 | 36.57 | 14,035 EUR | -9,538 |
| US Crude Oil | Daily | n/a | 308 | 33.44 | 13,514 EUR | -9,044 |
| Nasdaq 100 | Daily | n/a | 262 | 34.73 | 10,243 EUR | -4,946 |
| Nasdaq 100 | 1 hour | n/a | 2,904 | 29.68 | 9,279 EUR | -6,508 |
| DAX 40 | 30 min | n/a | 5,042 | 30.66 | 8,991 EUR | -4,141 |
| DAX 40 | Daily | n/a | 313 | 33.87 | 8,746 EUR | -6,719 |
| Gold | 30 min | n/a | 5,179 | 31.26 | 2,483 EUR | -875 |
| Gold | Daily | n/a | 372 | 32.80 | 1,885 EUR | -1,627 |
| Gold | 4 hours | n/a | 720 | 31.67 | 1,844 EUR | -1,105 |
| Gold | 1 hour | n/a | 2,980 | 30.13 | 1,396 EUR | -858 |
Charts
Top 10 of 14 runs. The full list is in the table above.
The code
// ============================================================== // 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
Questions
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.
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.
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.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.