The system buys on a break above the prior 50-bar high when the 200-period EMA is rising and a quality score is 0.8 or higher, and shorts the mirror setup. Positions close on a break through the opposite 50-bar channel or after 80 bars.
Best run of 20. S&P 500, Daily, spread 1, from run pf:2026-10-04-USA500-D.tsv:5.
| Period | Up to 2026-10-04 |
| Instrument | S&P 500, 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | Daily | 2.18 | 113 | 60.18 | 3,403 EUR | -743 |
| Gold | 30 min | 1.22 | 1,392 | 46.41 | 2,425 EUR | -511 |
| USD/JPY | Daily | n/a | 85 | 56.47 | 1,270,880 USD | -553,000 |
| USD/JPY | 4 hours | n/a | 244 | 50.41 | 811,840 USD | -236,360 |
| USD/JPY | 1 hour | n/a | 1,040 | 45.67 | 383,100 USD | -222,390 |
| USD/JPY | 15 min | n/a | 1,482 | 43.93 | 214,630 USD | -206,200 |
| EUR/USD | Daily | n/a | 73 | 56.16 | 45,001 USD | -44,050 |
| Silver | 30 min | n/a | 1,298 | 44.22 | 31,985 USD | -11,484 |
| Silver | 4 hours | n/a | 180 | 45.00 | 25,997 USD | -15,123 |
| Nikkei 225 | Daily | n/a | 72 | 47.22 | 20,768 USD | -10,873 |
| Nikkei 225 | 4 hours | n/a | 178 | 46.63 | 20,007 USD | -10,248 |
| Dow Jones | Daily | n/a | 105 | 52.38 | 10,968 EUR | -9,210 |
| Dow Jones | 30 min | n/a | 593 | 45.70 | 9,825 EUR | -9,246 |
| Nasdaq 100 | Daily | n/a | 91 | 60.44 | 8,036 EUR | -4,476 |
| Nasdaq 100 | 4 hours | n/a | 243 | 51.44 | 7,837 EUR | -5,897 |
| Gold | Daily | n/a | 81 | 54.32 | 2,721 EUR | -1,108 |
| Gold | 4 hours | n/a | 217 | 47.47 | 2,706 EUR | -736 |
| Gold | 1 hour | n/a | 853 | 44.78 | 2,590 EUR | -803 |
| Gold | 15 min | n/a | 1,422 | 42.62 | 1,743 EUR | -833 |
| S&P 500 | 4 hours | n/a | 240 | 52.92 | 1,309 EUR | -993 |
Charts
Top 10 of 20 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Donchian Breakout With Quality Score // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE entrybar = 0 dchigh = highest[50](high)[1] dclow = lowest[50](low)[1] ema = ExponentialAverage[200](close) myAtr = AverageTrueRange[14](close) macrohigh = highest[600](high)[1] macrolow = lowest[600](low)[1] macrorng = macrohigh - macrolow
64 more lines: the entry and exit rules.
Setup
S&P 500 had no history beyond the standard run, so both runs used 14,000 bars.
| Bars available | 14,000 |
| Net, standard 200,000-bar run | 3,403.29 EUR |
| Net, long run | 3,436.86 EUR |
| Net on the older data alone | 33.57 EUR |
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 20 market and timeframe combinations. The best run was S&P 500, Daily, with a profit factor of 2.18 over 113 trades.
The best run had a maximum drawdown of 743 EUR at the tested position size, against a net result of 3,403 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.