Entries come when RSI(14) climbs back above 30 for a long, or drops back below 70 for a short. Longs close when RSI passes 55 and shorts when it falls under 45, with a 1% stop on every trade.
Best run of 16. DAX 40, 30 min, spread 3, from run sweeps:2026-09-07-DAX40-30m-opt.tsv:9.
| Period | Up to 2026-09-07 |
| Instrument | DAX 40, 30 minutes |
| 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-07 |
| positionSize Contracts per trade | 1 |
| rsiPeriod RSI length | 14 |
| oversoldLevel Buy when RSI climbs back above this | 30 |
| overboughtLevel Sell short when RSI drops back below this | 70 |
| longExitLevel Close a long once RSI is above this | 55 |
| shortExitLevel Close a short once RSI is below this | 45 |
| stopLossPct Protective stop, percent of entry price | 1 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 30 min | n/a | 3,727 | 60.21 | -18,342 EUR | -18,609 |
| S&P 500 | 30 min | n/a | 3,344 | 60.32 | -2,217 EUR | -2,769 |
| S&P 500 | 1 hour | n/a | 2,599 | 56.79 | -2,351 EUR | -2,920 |
| Gold | 15 min | n/a | 3,101 | 61.79 | -2,593 EUR | -2,634 |
| Gold | 5 min | n/a | 2,714 | 60.57 | -2,970 EUR | -3,098 |
| Gold | 30 min | n/a | 3,361 | 59.27 | -3,056 EUR | -3,101 |
| S&P 500 | 5 min | n/a | 2,582 | 59.99 | -3,301 EUR | -3,716 |
| S&P 500 | 15 min | n/a | 3,231 | 62.67 | -3,353 EUR | -3,959 |
| Gold | 1 hour | n/a | 2,662 | 54.06 | -3,669 EUR | -3,991 |
| DAX 40 | 1 hour | n/a | 2,555 | 54.44 | -9,649 EUR | -12,339 |
| DAX 40 | 15 min | n/a | 3,232 | 62.38 | -10,744 EUR | -11,434 |
| DAX 40 | 5 min | n/a | 2,653 | 63.14 | -11,664 EUR | -13,224 |
| Nasdaq 100 | 5 min | n/a | 2,785 | 63.23 | -13,058 EUR | -16,375 |
| Nasdaq 100 | 15 min | n/a | 3,526 | 61.23 | -14,010 EUR | -14,934 |
| Nasdaq 100 | 30 min | n/a | 3,631 | 57.92 | -16,568 EUR | -17,228 |
| Nasdaq 100 | 1 hour | n/a | 2,890 | 50.42 | -16,571 EUR | -16,786 |
Charts
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 Mean Reversion // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade rsiPeriod = 14 // RSI length oversoldLevel = 30 // buy when RSI climbs back above this overboughtLevel = 70 // sell short when RSI drops back below this longExitLevel = 55 // close a long once RSI is above this shortExitLevel = 45 // close a short once RSI is below this stopLossPct = 1 // protective stop, percent of entry price // --- Indicators --- rsiValue = RSI[rsiPeriod](close)
26 more lines: the entry and exit rules.
Read this first
Questions
It is coded for ProOrder with 1 contract and a 1% stop. Every tested market lost, so it is not a live candidate as it stands.
S&P 500 30 minutes lost the least at EUR -2,216.86, and Gold runs sat between EUR -2,592.70 and EUR -3,669.30. Nasdaq 100 and DAX 40 lost the most.
On DAX 40 30 minutes the maximum drawdown was EUR 18,608.80. Nasdaq 100 30 minutes reached EUR 17,227.60.
RSI swings between 30 and 70 many times a day on short charts, giving thousands of trades. The large sample makes the negative result reliable.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.