Buys when the 9 period DEMA crosses above the 34 period DEMA, or while it stays above and RSI (14) is between 60 and 65. Closes the long when RSI reaches 75 or the averages cross down.
Best run of 17. S&P 500, Daily, spread 1, from run pf:2026-10-04-USA500-D.tsv:9.
| Period | Up to 2026-10-04 |
| Instrument | S&P 500, Daily |
| Spread | 1 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 |
|---|---|---|---|---|---|---|
| S&P 500Best run | Daily | 1.49 | 572 | 39.86 | 3,428 EUR | -826 |
| Gold | 4 hours | 1.32 | 1,109 | 39.77 | 2,876 EUR | -640 |
| DAX 40 | 1 hour | 1.14 | 3,725 | 37.88 | 17,383 EUR | -4,280 |
| USD/JPY | 1 hour | n/a | 4,783 | 37.32 | 563,140 USD | -164,140 |
| Nikkei 225 | 4 hours | n/a | 904 | 39.82 | 39,563 USD | -10,520 |
| Dow Jones | Daily | n/a | 549 | 41.53 | 20,952 EUR | -5,323 |
| Nikkei 225 | Daily | n/a | 433 | 38.80 | 19,080 USD | -14,300 |
| Silver | Daily | n/a | 451 | 32.37 | 16,161 USD | -14,561 |
| Nasdaq 100 | Daily | n/a | 411 | 42.09 | 10,396 EUR | -4,737 |
| DAX 40 | Daily | n/a | 537 | 41.90 | 10,168 EUR | -4,786 |
| Brent Crude | 4 hours | n/a | 625 | 39.04 | 9,262 EUR | -4,717 |
| US Crude Oil | Daily | n/a | 401 | 43.89 | 9,003 EUR | -8,566 |
| DAX 40 | 4 hours | n/a | 1,061 | 38.64 | 6,936 EUR | -5,326 |
| Nasdaq 100 | 4 hours | n/a | 1,155 | 38.87 | 4,372 EUR | -4,238 |
| Gold | Daily | n/a | 463 | 42.33 | 2,042 EUR | -693 |
| Gold | 1 hour | n/a | 4,201 | 35.59 | 1,423 EUR | -794 |
| S&P 500 | 4 hours | n/a | 1,124 | 38.70 | 1,172 EUR | -1,010 |
Charts
Top 10 of 17 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // DEMA Trend RSI Band Entry // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE nextop = 1 ONCE trend = 0 short = DEMA[9](close) long = DEMA[34](close) myRsi = RSI[14](close)
25 more lines: the entry and exit rules.
Setup
S&P 500 had no history beyond the standard run, so both runs used 14,000 bars.
| Bars available | 14,000 |
| Net, standard 200,000-bar run | 3,428.37 EUR |
| Net, long run | 3,428.37 EUR |
| Net on the older data alone | 0.00 EUR |
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 S&P 500, Daily, with a profit factor of 1.49 over 572 trades.
The best run had a maximum drawdown of 826 EUR at the tested position size, against a net result of 3,428 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.