Buys when the short EMA of RSI(16) is above its 29-period average and the close is above the 8-period EMA. Closes the position when the RSI EMA falls back below its average.
Best run of 21. Gold, 4 hours, spread 0.6, from run pf:2026-10-12-GOLD-4h.tsv:3.
| Period | Up to 2026-10-12 |
| Instrument | Gold, 4 hours |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 4 hours | 1.38 | 794 | 40.55 | 2,899 EUR | -728 |
| Gold | 1 hour | 1.34 | 2,862 | 40.36 | 4,852 EUR | -461 |
| Nasdaq 100 | 1 hour | 1.18 | 2,968 | 39.96 | 16,468 EUR | -2,793 |
| USD/JPY | 1 hour | 1.16 | 3,427 | 39.77 | 1,029,260 USD | -169,830 |
| USD/JPY | Daily | n/a | 331 | 44.11 | 800,420 USD | -500,800 |
| USD/JPY | 30 min | n/a | 4,940 | 38.18 | 311,600 USD | -290,330 |
| Silver | 4 hours | n/a | 782 | 39.13 | 32,297 USD | -12,245 |
| Nikkei 225 | 4 hours | n/a | 662 | 41.99 | 29,325 USD | -9,892 |
| Nikkei 225 | 1 hour | n/a | 2,395 | 39.67 | 27,714 USD | -7,827 |
| Dow Jones | Daily | n/a | 391 | 44.76 | 26,938 EUR | -7,752 |
| DAX 40 | 1 hour | n/a | 2,709 | 40.72 | 16,707 EUR | -5,044 |
| Nikkei 225 | Daily | n/a | 302 | 43.38 | 15,248 USD | -14,706 |
| Nasdaq 100 | 4 hours | n/a | 807 | 41.76 | 13,770 EUR | -4,203 |
| DAX 40 | Daily | n/a | 374 | 47.33 | 12,616 EUR | -4,387 |
| Dow Jones | 1 hour | n/a | 994 | 42.25 | 11,422 EUR | -10,108 |
| DAX 40 | 4 hours | n/a | 759 | 42.42 | 9,281 EUR | -4,306 |
| Dow Jones | 4 hours | n/a | 268 | 42.16 | 9,090 EUR | -7,910 |
| S&P 500 | Daily | n/a | 384 | 43.23 | 2,889 EUR | -1,304 |
| Gold | Daily | n/a | 340 | 41.76 | 2,653 EUR | -1,524 |
| S&P 500 | 4 hours | n/a | 829 | 43.18 | 1,904 EUR | -1,230 |
| S&P 500 | 1 hour | n/a | 3,020 | 40.23 | 1,529 EUR | -911 |
Charts
Top 10 of 21 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // RSI Moving Average Crossover Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false myRsi = RSI[16](close) emav = ExponentialAverage[12](myRsi) smav = Average[29](myRsi) ema = ExponentialAverage[8](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 21 market and timeframe combinations. The best run was Gold, 4 hours, with a profit factor of 1.38 over 794 trades.
The best run had a maximum drawdown of 728 EUR at the tested position size, against a net result of 2,899 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.