The idea buys when the 5 period high average is above the 20 period high average and RSI(11) is above 65. It sells the long when the 5 period high average falls below the 20 period low average and RSI(11) is below 35.
Best run of 35. S&P 500, Daily, spread 1, from run pf:2026-10-04-USA500-D.tsv:11.
| 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 | 3.49 | 110 | 44.55 | 5,214 EUR | -819 |
| USD/JPY | 30 min | n/a | 1,487 | 38.06 | 467,060 USD | -190,670 |
| USD/JPY | 1 hour | n/a | 1,098 | 40.35 | 448,420 USD | -248,610 |
| EUR/USD | Daily | n/a | 110 | 41.82 | 38,612 USD | -38,140 |
| Nikkei 225 | Daily | n/a | 90 | 38.89 | 35,614 USD | -13,961 |
| Nikkei 225 | 4 hours | n/a | 219 | 47.49 | 27,214 USD | -14,270 |
| Nikkei 225 | 3 min | n/a | 1,540 | 37.34 | 23,568 USD | -8,034 |
| Dow Jones | Daily | n/a | 126 | 40.48 | 20,216 EUR | -8,083 |
| Nikkei 225 | 5 min | n/a | 1,622 | 37.18 | 20,134 USD | -15,443 |
| Nasdaq 100 | Daily | n/a | 88 | 59.09 | 15,272 EUR | -4,820 |
| Nikkei 225 | 1 hour | n/a | 805 | 39.75 | 14,471 USD | -10,401 |
| US Crude Oil | Daily | n/a | 99 | 50.51 | 13,216 EUR | -5,518 |
| Dow Jones | 4 hours | n/a | 88 | 46.59 | 12,763 EUR | -6,615 |
| Nasdaq 100 | 4 hours | n/a | 301 | 44.19 | 12,463 EUR | -4,202 |
| Nikkei 225 | 2 min | n/a | 1,553 | 38.51 | 12,411 USD | -9,330 |
| Nasdaq 100 | 30 min | n/a | 1,500 | 41.53 | 11,603 EUR | -3,773 |
| DAX 40 | 30 min | n/a | 1,549 | 41.51 | 10,676 EUR | -4,116 |
| Brent Crude | Daily | n/a | 43 | 46.51 | 10,296 EUR | -5,988 |
| Nasdaq 100 | 15 min | n/a | 1,534 | 39.50 | 10,169 EUR | -4,084 |
| Nasdaq 100 | 1 hour | n/a | 980 | 42.35 | 10,132 EUR | -6,251 |
| DAX 40 | 4 hours | n/a | 281 | 43.06 | 9,947 EUR | -4,819 |
| Nasdaq 100 | 10 min | n/a | 1,536 | 35.68 | 9,500 EUR | -4,328 |
| Nasdaq 100 | 5 min | n/a | 1,504 | 38.36 | 8,479 EUR | -4,816 |
| Dow Jones | 30 min | n/a | 646 | 39.78 | 8,238 EUR | -6,782 |
| DAX 40 | Daily | n/a | 94 | 43.62 | 7,402 EUR | -4,985 |
| DAX 40 | 15 min | n/a | 1,546 | 39.72 | 4,072 EUR | -3,550 |
| Gold | Daily | n/a | 121 | 37.19 | 2,999 EUR | -886 |
| Gold | 1 hour | n/a | 911 | 40.61 | 2,796 EUR | -1,056 |
| Gold | 30 min | n/a | 1,463 | 37.05 | 2,781 EUR | -938 |
| Gold | 4 hours | n/a | 276 | 40.22 | 2,456 EUR | -1,446 |
| Gold | 10 min | n/a | 1,546 | 35.58 | 1,475 EUR | -756 |
| S&P 500 | 30 min | n/a | 1,538 | 39.47 | 1,441 EUR | -1,266 |
| S&P 500 | 4 hours | n/a | 300 | 41.00 | 1,213 EUR | -1,178 |
| Gold | 15 min | n/a | 1,526 | 35.91 | 1,174 EUR | -909 |
| Gold | 5 min | n/a | 1,568 | 36.54 | 904 EUR | -614 |
Charts
Top 10 of 35 runs. The full list is in the table above.
The code
// ============================================================== // Moving Average RSI Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false smahigh = Average[5](high) smahighslow = Average[20](high) smalowslow = Average[20](low) myRsi = RSI[11](close) body = abs(open - close) prevbody = abs(open[1] - close[1])
13 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 | 5,213.58 EUR |
| Net, long run | 5,247.15 EUR |
| Net on the older data alone | 33.57 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 35 market and timeframe combinations. The best run was S&P 500, Daily, with a profit factor of 3.49 over 110 trades.
The best run had a maximum drawdown of 819 EUR at the tested position size, against a net result of 5,214 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.