Buys when the 10-period exponential moving average crosses over the 20-period one, and closes the long when it crosses back under. It holds one contract, long only.
Best run of 19. Gold, Daily, spread 0.6, from run pf:2026-10-04-GOLD-D.tsv:5.
| Period | Up to 2026-10-04 |
| Instrument | Gold, Daily |
| Spread | 0.6 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 |
|---|---|---|---|---|---|---|
| GoldBest run | Daily | 2.01 | 298 | 32.21 | 3,488 EUR | -850 |
| Dow Jones | Daily | 1.75 | 305 | 40.33 | 26,405 EUR | -5,694 |
| Nikkei 225 | Daily | 1.67 | 234 | 35.90 | 52,221 USD | -10,039 |
| S&P 500 | Daily | 1.62 | 315 | 34.60 | 3,314 EUR | -710 |
| USD/JPY | Daily | n/a | 283 | 35.34 | 861,740 USD | -445,300 |
| USD/JPY | 1 hour | n/a | 2,926 | 31.07 | 760,630 USD | -241,970 |
| USD/JPY | 30 min | n/a | 4,237 | 29.74 | 558,710 USD | -182,340 |
| EUR/USD | Daily | n/a | 266 | 34.96 | 56,876 USD | -44,632 |
| Nikkei 225 | 4 hours | n/a | 583 | 33.45 | 21,274 USD | -16,305 |
| Nasdaq 100 | Daily | n/a | 245 | 36.33 | 18,909 EUR | -4,995 |
| Dow Jones | 4 hours | n/a | 215 | 36.74 | 15,635 EUR | -5,755 |
| Nasdaq 100 | 1 hour | n/a | 2,515 | 32.45 | 13,880 EUR | -3,643 |
| DAX 40 | Daily | n/a | 317 | 40.06 | 13,738 EUR | -3,633 |
| Nasdaq 100 | 4 hours | n/a | 669 | 36.02 | 12,382 EUR | -4,679 |
| DAX 40 | 1 hour | n/a | 2,372 | 32.17 | 11,146 EUR | -3,862 |
| DAX 40 | 30 min | n/a | 4,232 | 30.29 | 10,233 EUR | -3,616 |
| Gold | 4 hours | n/a | 647 | 33.38 | 3,076 EUR | -1,114 |
| Gold | 1 hour | n/a | 2,543 | 29.57 | 2,966 EUR | -862 |
| S&P 500 | 4 hours | n/a | 698 | 35.39 | 1,281 EUR | -1,276 |
Charts
Top 10 of 19 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // EMA Crossover Trend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false fast = ExponentialAverage[10](close) slow = ExponentialAverage[20](close)
9 more lines: the entry and exit rules.
Setup
Gold had no history beyond the standard run, so both runs used 13,000 bars.
| Bars available | 13,000 |
| Net, standard 200,000-bar run | 3,488.20 EUR |
| Net, long run | 3,488.20 EUR |
| Net on the older data alone | 0.00 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 19 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 2.01 over 298 trades.
The best run had a maximum drawdown of 850 EUR at the tested position size, against a net result of 3,488 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.