Buys when the 13 period double exponential average moves above the 34 period one. Closes the long when the 34 period average moves back above the 13 period one.
Best run of 21. Gold, 1 hour, spread 0.6, from run pf:2026-10-04-GOLD-1h.tsv:6.
| Period | Up to 2026-10-04 |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 1 hour | 1.22 | 2,947 | 36.31 | 3,388 EUR | -641 |
| USD/JPY | 1 hour | 1.15 | 3,496 | 37.53 | 976,220 USD | -172,815 |
| USD/JPY | Daily | n/a | 327 | 38.84 | 955,250 USD | -543,800 |
| USD/JPY | 30 min | n/a | 5,013 | 34.63 | 434,190 USD | -211,110 |
| Nikkei 225 | 4 hours | n/a | 657 | 38.51 | 38,630 USD | -10,032 |
| Silver | 4 hours | n/a | 769 | 36.67 | 31,994 USD | -13,171 |
| Nikkei 225 | 1 hour | n/a | 2,447 | 36.25 | 23,261 USD | -10,412 |
| Nikkei 225 | Daily | n/a | 329 | 37.08 | 19,915 USD | -14,712 |
| Dow Jones | Daily | n/a | 402 | 41.79 | 19,445 EUR | -5,715 |
| DAX 40 | 1 hour | n/a | 2,806 | 37.42 | 14,384 EUR | -4,388 |
| Nasdaq 100 | 1 hour | n/a | 3,158 | 36.07 | 10,614 EUR | -5,946 |
| Dow Jones | 1 hour | n/a | 1,042 | 36.66 | 10,490 EUR | -10,099 |
| Nasdaq 100 | Daily | n/a | 310 | 38.71 | 8,927 EUR | -5,412 |
| DAX 40 | Daily | n/a | 396 | 38.64 | 8,201 EUR | -6,179 |
| DAX 40 | 4 hours | n/a | 803 | 37.98 | 7,148 EUR | -5,034 |
| DAX 40 | 30 min | n/a | 4,877 | 35.12 | 5,443 EUR | -5,188 |
| Brent Crude | 1 hour | n/a | 1,593 | 36.72 | 5,311 EUR | -4,920 |
| Nasdaq 100 | 30 min | n/a | 4,994 | 35.10 | 4,700 EUR | -4,688 |
| Gold | 4 hours | n/a | 801 | 38.33 | 3,081 EUR | -879 |
| S&P 500 | Daily | n/a | 436 | 36.70 | 2,724 EUR | -719 |
| Gold | Daily | n/a | 340 | 38.24 | 2,541 EUR | -1,532 |
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
// ============================================================== // DEMA 13 34 Crossover // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE trend = -1 demas = DEMA[13](close) demal = DEMA[34](close)
19 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, 1 hour, with a profit factor of 1.22 over 2,947 trades.
The best run had a maximum drawdown of 641 EUR at the tested position size, against a net result of 3,388 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.