Buys when the 20-period EMA crosses above the 55-period EMA and sells short when it crosses below. Each cross reverses any open position, so the system is always positioned after the first signal.
Best run of 15. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:17.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 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 |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 2.05 | 212 | 35.38 | 3,190,930 USD | -499,500 |
| USD/JPY | 30 min | n/a | 3,470 | 29.71 | 706,850 USD | -264,470 |
| USD/JPY | 1 hour | n/a | 2,475 | 30.26 | 379,970 USD | -356,500 |
| USD/JPY | 10 min | n/a | 3,625 | 27.39 | 306,990 USD | -187,650 |
| USD/JPY | 15 min | n/a | 3,641 | 27.30 | 294,300 USD | -166,560 |
| EUR/USD | 2 min | n/a | 3,985 | 23.86 | 225,014 USD | -205,971 |
| EUR/USD | Daily | n/a | 249 | 30.52 | 99,859 USD | -82,441 |
| Nikkei 225 | Daily | n/a | 188 | 29.79 | 36,752 USD | -24,705 |
| US Crude Oil | Daily | n/a | 202 | 36.14 | 18,490 EUR | -7,448 |
| Brent Crude | Daily | n/a | 90 | 34.44 | 14,389 EUR | -7,031 |
| Nikkei 225 | 2 min | n/a | 3,530 | 27.62 | 12,789 USD | -12,212 |
| Nasdaq 100 | Daily | n/a | 190 | 33.16 | 9,610 EUR | -5,367 |
| Gold | 30 min | n/a | 3,547 | 27.80 | 2,304 EUR | -1,437 |
| Gold | Daily | n/a | 252 | 30.56 | 1,973 EUR | -1,466 |
| Gold | 1 hour | n/a | 2,103 | 30.10 | 1,913 EUR | -1,440 |
Charts
Top 10 of 15 runs. The full list is in the table above.
The code
// ============================================================== // EMA 20 55 Crossover Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false fast = ExponentialAverage[20](close) slow = ExponentialAverage[55](close)
10 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 15 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 2.05 over 212 trades.
The best run had a maximum drawdown of 499,500 USD at the tested position size, against a net result of 3,190,930 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.