Holds a long position while the 5-period exponential average is above the 10-period one, and exits when it falls below. Only long trades are taken.
Best run of 15. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-04-USDJPY-4h-opt.tsv:55.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 4 hours |
| 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 | 4 hours | n/a | 1,502 | 33.56 | 514,480 USD | -264,460 |
| USD/JPY | Daily | n/a | 570 | 29.12 | 837,680 USD | -404,400 |
| Nikkei 225 | Daily | n/a | 491 | 34.01 | 38,250 USD | -13,959 |
| Silver | Daily | n/a | 542 | 29.52 | 28,634 USD | -26,158 |
| Nikkei 225 | 4 hours | n/a | 1,095 | 33.06 | 22,713 USD | -10,972 |
| Dow Jones | Daily | n/a | 628 | 36.78 | 19,430 EUR | -7,218 |
| GBP/USD | Daily | n/a | 576 | 34.72 | 10,003 USD | -6,462 |
| DAX 40 | Daily | n/a | 650 | 33.69 | 9,222 EUR | -4,696 |
| DAX 40 | 4 hours | n/a | 1,285 | 33.70 | 8,755 EUR | -4,368 |
| Dow Jones | 4 hours | n/a | 449 | 32.74 | 7,523 EUR | -5,390 |
| Nasdaq 100 | 4 hours | n/a | 1,303 | 35.99 | 7,368 EUR | -5,588 |
| Nasdaq 100 | Daily | n/a | 493 | 33.06 | 7,155 EUR | -6,726 |
| Gold | Daily | n/a | 588 | 29.93 | 2,511 EUR | -1,419 |
| Gold | 4 hours | n/a | 1,349 | 32.17 | 2,259 EUR | -1,184 |
| S&P 500 | Daily | n/a | 660 | 32.27 | 1,690 EUR | -1,329 |
Charts
Top 10 of 15 runs. The full list is in the table above.
The code
// ============================================================== // Fast EMA Trend Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false emaa = ExponentialAverage[5](close) emab = ExponentialAverage[10](close)
9 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 by trade count was USD/JPY, 4 hours, with 1,502 trades.
The best run had a maximum drawdown of 264,460 USD at the tested position size, against a net result of 514,480 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.