The system buys when the close crosses above the midpoint of the 40-bar Donchian channel and sells short when it crosses below. Each trade has a stop 3.0 times the 14-period ATR away and a target at the distance to the opposite channel edge.
Best run of 8. Nasdaq 100, 30 min, spread 3, from run pf:2026-10-05-NAS100-30m.tsv:4.
| Period | Up to 2026-10-05 |
| Instrument | Nasdaq 100, 30 minutes |
| Spread | 3 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | 30 min | 25.61 | 134 | 58.21 | 28,480 EUR | -6,277 |
| Nikkei 225 | 1 hour | 10.75 | 129 | 55.81 | 60,424 USD | -12,691 |
| S&P 500 | 30 min | 3.89 | 462 | 50.43 | 5,654 EUR | -1,319 |
| Silver | Daily | n/a | 230 | 56.09 | 24,471 USD | -15,862 |
| Dow Jones | 4 hours | n/a | 238 | 62.18 | 13,370 EUR | -5,753 |
| Dow Jones | Daily | n/a | 308 | 59.42 | 13,039 EUR | -7,610 |
| Brent Crude | 1 hour | n/a | 1,418 | 57.90 | 9,426 EUR | -2,402 |
| Brent Crude | Daily | n/a | 101 | 57.43 | 6,823 EUR | -5,328 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Donchian Midline Cross With ATR Stop // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false up = Highest[40](high) dn = Lowest[40](low) basis = (up + dn) / 2 myAtr = AverageTrueRange[14](close) sldist = myAtr * 3.0 longtp = up - close shorttp = close - dn
15 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 8 market and timeframe combinations. The best run was Nasdaq 100, 30 minutes, with a profit factor of 25.61 over 134 trades.
The best run had a maximum drawdown of 6,277 EUR at the tested position size, against a net result of 28,480 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.