Buys when the 8-period EMA crosses above the 20-period EMA and sells when it crosses back below. Trades one contract, long only, with no stop or target.
Best run of 18. Nikkei 225, Daily, spread 10, from run pf:2026-10-10-NIKKEI-D.tsv:3.
| Period | Up to 2026-10-10 |
| Instrument | Nikkei 225, Daily |
| Spread | 10 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 |
|---|---|---|---|---|---|---|
| Nikkei 225Best run | Daily | 1.70 | 264 | 35.61 | 56,025 USD | -10,539 |
| Dow Jones | Daily | 1.68 | 351 | 37.89 | 25,943 EUR | -6,093 |
| DAX 40 | 1 hour | 1.12 | 2,635 | 32.11 | 12,506 EUR | -2,880 |
| USD/JPY | 1 hour | n/a | 3,282 | 30.26 | 705,190 USD | -233,550 |
| USD/JPY | 30 min | n/a | 4,715 | 28.84 | 530,260 USD | -185,950 |
| EUR/USD | Daily | n/a | 296 | 32.77 | 66,872 USD | -39,550 |
| Nikkei 225 | 4 hours | n/a | 637 | 32.34 | 22,966 USD | -16,256 |
| Nasdaq 100 | Daily | n/a | 272 | 36.40 | 17,453 EUR | -4,914 |
| Dow Jones | 4 hours | n/a | 245 | 35.92 | 16,148 EUR | -5,775 |
| DAX 40 | Daily | n/a | 341 | 40.18 | 14,375 EUR | -3,594 |
| Nasdaq 100 | 4 hours | n/a | 740 | 35.81 | 11,468 EUR | -5,918 |
| Nasdaq 100 | 1 hour | n/a | 2,809 | 32.15 | 11,331 EUR | -4,298 |
| DAX 40 | 30 min | n/a | 4,711 | 29.70 | 7,525 EUR | -4,480 |
| Gold | Daily | n/a | 336 | 28.27 | 3,360 EUR | -869 |
| Gold | 4 hours | n/a | 713 | 33.38 | 3,291 EUR | -903 |
| S&P 500 | Daily | n/a | 372 | 33.06 | 3,082 EUR | -847 |
| Gold | 1 hour | n/a | 2,852 | 29.49 | 2,572 EUR | -902 |
| S&P 500 | 4 hours | n/a | 777 | 35.01 | 1,288 EUR | -1,279 |
Charts
Top 10 of 18 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // EMA 8 20 Crossover Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false emafast = ExponentialAverage[8](close) emaslow = ExponentialAverage[20](close)
9 more lines: the entry and exit rules.
Setup
Nikkei 225 had no history beyond the standard run, so both runs used 11,000 bars.
| Bars available | 11,000 |
| Net, standard 200,000-bar run | 56,025.10 USD |
| Net, long run | 56,025.10 USD |
| Net on the older data alone | 0.00 USD |
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 18 market and timeframe combinations. The best run was Nikkei 225, Daily, with a profit factor of 1.70 over 264 trades.
The best run had a maximum drawdown of 10,539 USD at the tested position size, against a net result of 56,025 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.