Buys when the 9-period EMA crosses above the 21-period EMA, with a 1% stop loss and a 2% profit target measured from the fill price. Sells to close the long when the 9-period EMA crosses below the 21-period EMA.
Best run of 16. Dow Jones, Daily, spread 3, from run pf:2026-10-12-DOW30-D.tsv:25.
| Period | Up to 2026-10-12 |
| Instrument | Dow Jones, Daily |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Dow JonesBest run | Daily | 1.59 | 317 | 35.65 | 10,921 EUR | -2,485 |
| USD/JPY | 1 hour | 1.17 | 3,010 | 30.73 | 958,770 USD | -227,750 |
| USD/JPY | 30 min | n/a | 4,361 | 29.26 | 626,850 USD | -188,610 |
| USD/JPY | Daily | n/a | 290 | 34.83 | 450,620 USD | -213,180 |
| EUR/USD | Daily | n/a | 275 | 36.00 | 35,076 USD | -24,646 |
| Nikkei 225 | 1 hour | n/a | 2,173 | 30.92 | 17,690 USD | -8,116 |
| Nikkei 225 | Daily | n/a | 240 | 40.00 | 9,855 USD | -2,663 |
| DAX 40 | 1 hour | n/a | 2,429 | 31.58 | 9,174 EUR | -2,690 |
| Nasdaq 100 | 1 hour | n/a | 2,604 | 31.18 | 8,566 EUR | -3,672 |
| Dow Jones | 1 hour | n/a | 904 | 31.08 | 7,553 EUR | -7,418 |
| DAX 40 | 30 min | n/a | 4,333 | 30.12 | 5,748 EUR | -3,746 |
| GBP/USD | Daily | n/a | 317 | 35.02 | 5,545 USD | -2,508 |
| Gold | 1 hour | n/a | 2,610 | 29.35 | 1,312 EUR | -919 |
| S&P 500 | 4 hours | n/a | 718 | 34.40 | 1,186 EUR | -782 |
| Gold | 4 hours | n/a | 665 | 33.23 | 984 EUR | -374 |
| S&P 500 | Daily | n/a | 331 | 29.91 | 977 EUR | -304 |
Charts
Top 10 of 16 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // EMA 9 21 Crossover Bracket Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false fast = ExponentialAverage[9](close) slow = ExponentialAverage[21](close)
11 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 16 market and timeframe combinations. The best run was Dow Jones, Daily, with a profit factor of 1.59 over 317 trades.
The best run had a maximum drawdown of 2,485 EUR at the tested position size, against a net result of 10,921 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.