The system enters when a 4-period EMA crosses a 5-period EMA and at least 5 of 7 trend conditions agree, provided the volume ratio is at least 0.9. It places a stop at 1.5 times ATR(14) and a target at 3 times that distance.
Best run of 5. Gold, 4 hours, spread 0.6, from run sweeps:2026-10-04-GOLD-4h-opt.tsv:125.
| Period | Up to 2026-10-04 |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 4 hours | n/a | 813 | 29.64 | 1,890 EUR | -1,107 |
| Nikkei 225 | 4 hours | n/a | 362 | 26.52 | 20,278 USD | -10,611 |
| Dow Jones | Daily | n/a | 45 | 35.56 | 15,219 EUR | -6,482 |
| S&P 500 | Daily | n/a | 83 | 32.53 | 1,213 EUR | -998 |
| Gold | Daily | n/a | 97 | 30.93 | 1,168 EUR | -923 |
Charts
The code
// ============================================================== // EMA Crossover Trend Score Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false emaa = ExponentialAverage[4](close) emab = ExponentialAverage[5](close) emac = ExponentialAverage[21](close) smad = Average[50](close) emae = ExponentialAverage[55](close) emaf = ExponentialAverage[89](close) emag = ExponentialAverage[750](close) myRsi = RSI[14](close) myAtr = AverageTrueRange[14](close) volshort = Average[10](volume) vollong = Average[40](volume) volraw = volshort / max(vollong, 1) volratio = ExponentialAverage[3](volraw)
21 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 5 market and timeframe combinations. The best run by trade count was Gold, 4 hours, with 813 trades.
The best run had a maximum drawdown of 1,107 EUR at the tested position size, against a net result of 1,890 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.