This long-only system waits for price to hold above its 200-period SMA, then buys when the last two RSI(2) values add up to less than 35. It sells once that sum climbs above 65. Trades are short pullback bounces inside an uptrend.
Best run of 8. S&P 500, Daily, spread 1, from run pf:2026-09-24-USA500-D.tsv:9.
| Period | Up to 2026-09-25 |
| Instrument | S&P 500, Daily |
| Spread | 1 points |
| Contracts | 10 |
| 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-09-25 |
| positionSize Contracts per trade, as tested | 10 |
| rsiPeriod RSI length | 2 |
| sumPeriod Bars of RSI added together | 2 |
| trendPeriod Trend SMA length | 200 |
| entryLevel Buy when the summed RSI is below this | 35 |
| exitLevel Sell when the summed RSI is above this | 65 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | Daily | 2.11 | 533 | 63.23 | 27,883 EUR | -4,887 |
| Nasdaq 100 | Daily | 2.10 | 405 | 61.23 | 94,132 EUR | -14,939 |
| Nikkei 225 | Daily | 1.93 | 322 | 69.88 | 314,817 USD | -67,643 |
| EUR/USD | Daily | n/a | 304 | 67.11 | 354,950 USD | -234,300 |
| Dow Jones | Daily | n/a | 496 | 63.91 | 63,435 EUR | -54,685 |
| US Crude Oil | Daily | n/a | 279 | 63.44 | 50,205 EUR | -38,065 |
| GBP/USD | 4 hours | n/a | 1,105 | 65.52 | 29,849 USD | -11,362 |
| FTSE 100 | Daily | n/a | 375 | 66.40 | 25,486 EUR | -11,387 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.
// ============================================================ // Cumulative RSI Pullback // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 10 // contracts per trade, as tested rsiPeriod = 2 // RSI length sumPeriod = 2 // bars of RSI added together trendPeriod = 200 // long-term trend filter entryLevel = 35 // buy when the summed RSI is below this exitLevel = 65 // sell when the summed RSI is above this // --- Indicators --- cumulativeRsi = Summation[sumPeriod](RSI[rsiPeriod](close)) trendMA = Average[trendPeriod](close)
14 more lines: the entry and exit rules.
Read this first
Questions
Yes. The rules are simple and fully coded for automated trading. The default position size is 10 contracts, matching the backtest.
S&P 500 daily gave profit factor 2.11 and EUR 27,882.80 over 533 trades. Nasdaq 100 daily (2.1) and Nikkei 225 daily (1.93) were close behind, and every market in the list was profitable.
At 10 contracts on S&P 500 daily the max drawdown was EUR 4,887.10. Scale that down in proportion if you trade fewer contracts.
The 200-period trend filter and the RSI(2) pullback idea are built around daily swings. A 4 hour test on GBP/USD produced 1,105 trades but a smaller edge per trade.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.