The system adds the last two RSI(2) readings and trades pullbacks inside the trend. It buys when that sum drops below 35 above the 100 period SMA, and sells short when it tops 175 below the 110 period SMA. Longs can add up to 4 contracts.
Best run of 10. Nasdaq 100, Daily, spread 3, from run pf:2026-09-16-NAS100-D.tsv:1.
| Period | Up to 2026-09-16 |
| 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-16 |
| positionSize Contracts per trade | 1 |
| rsiPeriod RSI length and number of readings summed | 2 |
| longTrendPeriod Longs only above this average | 100 |
| shortTrendPeriod Shorts only below this average | 110 |
| maxLongPositions Cap on open long contracts | 4 |
| longEntryLevel Buy below this cumulative RSI | 35 |
| longExitLevel Sell above this cumulative RSI | 65 |
| shortEntryLevel Short above this cumulative RSI | 175 |
| shortExitLevel Cover below this cumulative RSI | 120 |
| trailLongPoints Trailing distance for longs | 25 |
| trailShortPoints Trailing distance for shorts | 15 |
| longChannelPeriod Channel stop length for longs | 40 |
| shortChannelPeriod Channel stop length for shorts | 30 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | Daily | 1.64 | 461 | 58.79 | 6,799 EUR | -2,071 |
| S&P 500 | Daily | 1.58 | 664 | 54.37 | 2,288 EUR | -439 |
| Nikkei 225 | Daily | 1.54 | 482 | 68.05 | 22,595 USD | -7,286 |
| USD/JPY | Daily | 1.43 | 498 | 69.68 | 852,470 JPY | -171,500 |
| US Crude Oil | Daily | 1.32 | 474 | 63.50 | 7,134 EUR | -2,923 |
| EUR/USD | 4 hours | 1.22 | 1,809 | 63.52 | 53,383 USD | -8,902 |
| FTSE 100 | Daily | 1.22 | 483 | 63.56 | 2,507 EUR | -1,189 |
| GBP/USD | Daily | 1.20 | 554 | 70.04 | 4,989 USD | -3,411 |
| EUR/USD | Daily | 1.17 | 514 | 63.81 | 29,021 USD | -16,990 |
| USD/JPY | 1 hour | 1.09 | 5,389 | 60.98 | 324,510 JPY | -87,520 |
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 Long and Short // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false DEFPARAM PreloadBars = 1000 // --- Parameters --- positionSize = 1 // contracts per trade rsiPeriod = 2 // RSI length, also the number of readings summed longTrendPeriod = 100 // longs only above this average shortTrendPeriod = 110 // shorts only below this average maxLongPositions = 4 // cap on open long contracts longEntryLevel = 35 // buy when cumulative RSI is below this longExitLevel = 65 // sell when cumulative RSI is above this shortEntryLevel = 175 // short when cumulative RSI is above this shortExitLevel = 120 // cover when cumulative RSI is below this trailLongPoints = 25 // trailing distance for longs trailShortPoints = 15 // trailing distance for shorts longChannelPeriod = 40 // channel stop length for longs shortChannelPeriod = 30 // channel stop length for shorts // --- Indicators --- cumulativeRsi = Summation[rsiPeriod](RSI[rsiPeriod](close)) longTrendMA = Average[longTrendPeriod](close) shortTrendMA = Average[shortTrendPeriod](close) belowLongCap = CountOfLongShares < maxLongPositions
71 more lines: the entry and exit rules.
Read this first
Questions
Yes, it runs as an automated ProOrder system with signal exits, a trailing stop and a channel stop.
All nine market tests had a profit factor above 1, from 1.09 on USD/JPY 1 hour up to 1.58 on S&P 500 Daily. The best run was Nasdaq 100 Daily at 1.64.
On Nasdaq 100 Daily the worst drawdown was 2,070.6 EUR with a base size of 1 contract. Because longs can stack to 4 contracts, allow extra room.
RSI(2) pullbacks inside a longer trend are a daily chart idea. Most of the tested rows are daily, and EUR/USD 4 hours was the only intraday test besides USD/JPY 1 hour.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.