The strategy buys when the positive directional line leads and trend strength is rising, with price above two long EMAs. Entries require a breakout above the prior bar high and a wide EMA spread, with exits when the trend turns down.
Best run of 17. Gold, 30 min, spread 0.6, from run pf:2026-10-12-GOLD-30m.tsv:4.
| Period | Up to 2026-10-12 |
| Instrument | Gold, 30 minutes |
| 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 | 30 min | 1.33 | 1,998 | 33.28 | 2,051 EUR | -294 |
| USD/JPY | 1 hour | n/a | 1,181 | 37.85 | 376,670 USD | -106,670 |
| Silver | 1 hour | n/a | 840 | 35.00 | 24,525 USD | -7,935 |
| Nikkei 225 | 4 hours | n/a | 406 | 36.95 | 24,003 USD | -5,629 |
| EUR/USD | 4 hours | n/a | 261 | 33.33 | 19,245 USD | -16,415 |
| Silver | 4 hours | n/a | 236 | 40.68 | 12,614 USD | -9,273 |
| Dow Jones | Daily | n/a | 224 | 42.41 | 10,795 EUR | -4,331 |
| Nasdaq 100 | Daily | n/a | 154 | 50.00 | 9,012 EUR | -3,475 |
| Nasdaq 100 | 4 hours | n/a | 534 | 38.01 | 6,710 EUR | -2,572 |
| Dow Jones | 4 hours | n/a | 113 | 40.71 | 6,271 EUR | -2,555 |
| DAX 40 | Daily | n/a | 239 | 40.17 | 5,113 EUR | -3,727 |
| DAX 40 | 4 hours | n/a | 394 | 39.34 | 4,889 EUR | -1,794 |
| DAX 40 | 1 hour | n/a | 1,376 | 34.08 | 3,278 EUR | -3,182 |
| Gold | 4 hours | n/a | 355 | 37.75 | 2,157 EUR | -614 |
| Gold | 1 hour | n/a | 1,425 | 34.04 | 1,834 EUR | -582 |
| S&P 500 | Daily | n/a | 248 | 42.74 | 1,241 EUR | -838 |
| S&P 500 | 4 hours | n/a | 484 | 37.19 | 757 EUR | -525 |
Charts
Top 10 of 17 runs. The full list is in the table above.
The code
// ============================================================== // DMI Trend Breakout Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false emas = ExponentialAverage[63](close) emam = ExponentialAverage[2400](close) emal = ExponentialAverage[4800](close) myAtr = AverageTrueRange[2](close) avgatr = Average[4800](myAtr) up = high - high[1] dn = low[1] - low
38 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 17 market and timeframe combinations. The best run was Gold, 30 minutes, with a profit factor of 1.33 over 1,998 trades.
The best run had a maximum drawdown of 294 EUR at the tested position size, against a net result of 2,051 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.