The strategy buys when the 8-period EMA crosses above the 21-period EMA. It closes the long when the 21-period EMA crosses above the 8-period EMA, and each trade carries a 20% stop and a 50% target.
Best run of 20. USD/JPY, 30 min, spread 1, from run sweeps:2026-10-04-USDJPY-30m-opt.tsv:48.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 30 minutes |
| 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 |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 30 min | n/a | 4,625 | 28.76 | 530,360 USD | -192,250 |
| USD/JPY | 1 hour | n/a | 3,176 | 30.13 | 773,670 USD | -213,070 |
| USD/JPY | Daily | n/a | 112 | 34.82 | 484,500 USD | -253,320 |
| Silver | 4 hours | n/a | 769 | 27.96 | 36,116 USD | -19,023 |
| Nikkei 225 | Daily | n/a | 74 | 37.84 | 32,809 USD | -10,448 |
| Nikkei 225 | 4 hours | n/a | 398 | 31.91 | 18,552 USD | -15,959 |
| Dow Jones | Daily | n/a | 40 | 55.00 | 18,449 EUR | -5,986 |
| Nasdaq 100 | Daily | n/a | 68 | 42.65 | 15,827 EUR | -5,094 |
| Dow Jones | 4 hours | n/a | 232 | 36.21 | 15,508 EUR | -6,248 |
| Nasdaq 100 | 1 hour | n/a | 1,333 | 34.36 | 14,841 EUR | -4,104 |
| Nikkei 225 | 1 hour | n/a | 1,431 | 30.61 | 13,890 USD | -13,138 |
| Nasdaq 100 | 4 hours | n/a | 355 | 38.59 | 12,194 EUR | -5,410 |
| DAX 40 | Daily | n/a | 50 | 50.00 | 7,059 EUR | -2,948 |
| DAX 40 | 1 hour | n/a | 1,177 | 33.73 | 6,091 EUR | -5,115 |
| DAX 40 | 30 min | n/a | 2,262 | 32.05 | 4,822 EUR | -4,341 |
| Gold | 4 hours | n/a | 698 | 32.95 | 3,279 EUR | -837 |
| S&P 500 | Daily | n/a | 65 | 38.46 | 3,141 EUR | -805 |
| Gold | 1 hour | n/a | 2,753 | 29.20 | 2,633 EUR | -827 |
| S&P 500 | 4 hours | n/a | 371 | 35.31 | 2,320 EUR | -1,187 |
| Gold | Daily | n/a | 104 | 30.77 | 2,192 EUR | -869 |
Charts
Top 10 of 20 runs. The full list is in the table above.
The code
// ============================================================== // EMA Crossover With Profit Target // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false emafast = ExponentialAverage[8](close) emaslow = ExponentialAverage[21](close)
13 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 20 market and timeframe combinations. The best run by trade count was USD/JPY, 30 minutes, with 4,625 trades.
The best run had a maximum drawdown of 192,250 USD at the tested position size, against a net result of 530,360 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.