Short-term oversold dips get bought when the trend is up: close above the 50-period SMA and RSI(2) at or below 10. The short side mirrors this with RSI(2) at or above 90 below the SMA. Longs close when RSI(2) rises above 70 and shorts when it falls below 30.
Best run of 16. Nasdaq 100, Daily, spread 3, from run pf:2026-09-24-NAS100-D.tsv:9.
| Period | Up to 2026-09-25 |
| Instrument | Nasdaq 100, Daily |
| Spread | 3 points |
| Contracts | 1 |
| 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 | 1 |
| trendPeriod Trend SMA length | 50 |
| rsiPeriod RSI length | 2 |
| oversoldLevel Long entry RSI level | 10 |
| overboughtLevel Short entry RSI level | 90 |
| rsiLongExitLevel Long exit RSI level | 70 |
| rsiShortExitLevel Short exit RSI level | 30 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | Daily | 1.76 | 362 | 64.64 | 9,598 EUR | -2,311 |
| Nikkei 225 | Daily | 1.59 | 376 | 70.48 | 32,357 USD | -7,418 |
| EUR/USD | 4 hours | 1.24 | 1,500 | 66.33 | 65,302 USD | -11,595 |
| USD/JPY | 30 min | 1.12 | 6,233 | 65.79 | 445,850 JPY | -86,410 |
| USD/JPY | 1 hour | n/a | 4,410 | 65.92 | 366,760 JPY | -180,260 |
| EUR/USD | Daily | n/a | 425 | 66.35 | 46,134 USD | -22,111 |
| EUR/USD | 1 hour | n/a | 5,568 | 65.59 | 26,731 USD | -25,853 |
| EUR/USD | 30 min | n/a | 6,171 | 64.04 | 15,715 USD | -10,522 |
| Dow Jones | Daily | n/a | 489 | 63.60 | 13,727 EUR | -6,698 |
| US Crude Oil | Daily | n/a | 362 | 66.85 | 11,586 EUR | -3,281 |
| Dow Jones | 4 hours | n/a | 347 | 66.86 | 9,634 EUR | -2,902 |
| Silver | 1 hour | n/a | 3,688 | 59.03 | 9,291 USD | -7,430 |
| Brent Crude | Daily | n/a | 166 | 63.25 | 7,322 EUR | -2,397 |
| GBP/USD | 1 hour | n/a | 5,506 | 66.58 | 5,017 USD | -2,307 |
| DAX 40 | Daily | n/a | 527 | 63.57 | 3,598 EUR | -2,962 |
| S&P 500 | Daily | n/a | 536 | 58.40 | 2,001 EUR | -872 |
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.
// ============================================================ // RSI 2 Trend Pullback // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade trendPeriod = 50 // SMA that sets the allowed direction rsiPeriod = 2 // RSI length oversoldLevel = 10 // buy at or below this RSI in an uptrend overboughtLevel = 90 // short at or above this RSI in a downtrend rsiLongExitLevel = 70 // close longs above this RSI rsiShortExitLevel = 30 // close shorts below this RSI // --- Indicators --- trendMA = Average[trendPeriod](close) rsiValue = RSI[rsiPeriod](close)
27 more lines: the entry and exit rules.
Read this first
Questions
Yes, every rule is automatable. The code was rewritten after testing and not compile-checked, so run it in ProBacktest first.
Indices, currency pairs, oil and Silver, and every listed run was profitable. Nikkei 225 daily recorded a profit factor of 1.59 over 376 trades.
The Nasdaq 100 daily run had a max drawdown of EUR 2,311.4 at position size 1, with a 64.64% win rate.
The daily chart gave the best recorded run, and the 50-period trend filter reads cleaner there than on intraday charts.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.