The strategy buys when the whole bar trades above a 20-period EMA, ADX(14) is above 20, and that EMA is higher than 5 bars earlier. It sells when the whole bar trades below a 10-period EMA.
Best run of 9. Gold, 1 hour, spread 0.6, from run sweeps:2026-10-07-GOLD-1h-opt.tsv:39.
| Period | Up to 2026-10-07 |
| Instrument | Gold, 1 hour |
| 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-07 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 1 hour | n/a | 2,625 | 34.44 | 1,252 EUR | -1,102 |
| Nikkei 225 | Daily | n/a | 282 | 40.07 | 18,246 USD | -7,523 |
| Nasdaq 100 | Daily | n/a | 266 | 40.60 | 11,087 EUR | -3,293 |
| DAX 40 | 1 hour | n/a | 2,493 | 36.18 | 7,472 EUR | -3,902 |
| Brent Crude | Daily | n/a | 121 | 43.80 | 6,770 EUR | -6,188 |
| DAX 40 | Daily | n/a | 413 | 39.47 | 5,859 EUR | -3,166 |
| Gold | 4 hours | n/a | 753 | 38.51 | 2,478 EUR | -719 |
| Gold | Daily | n/a | 322 | 33.54 | 1,957 EUR | -1,031 |
| S&P 500 | Daily | n/a | 367 | 36.51 | 1,095 EUR | -806 |
Charts
The code
// ============================================================== // Rising EMA With ADX Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false emafast = ExponentialAverage[10](close) emaslow = ExponentialAverage[20](close) myAdx = ADX[14] slope = emaslow - emaslow[5]
12 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 9 market and timeframe combinations. The best run by trade count was Gold, 1 hour, with 2,625 trades.
The best run had a maximum drawdown of 1,102 EUR at the tested position size, against a net result of 1,252 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.