Join today
Strategies / Mean reversion / RSI Mean Reversion

RSI Mean Reversion: Fading Oversold and Overbought

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.

Mean reversionLong & shortIntradayDAX 4030 min
n/aProfit factor
-18,342Net profit EUR
60.21%Win rate
3,727Trades
-18,609Max drawdown
-4.92Avg trade

Best run of 16. DAX 40, 30 min, spread 3, from run sweeps:2026-09-07-DAX40-30m-opt.tsv:9.

Entry rules, long

  1. Members only
  2. No position is open

Entry rules, short

  1. Members only
  2. No position is open

Exit rules

  1. Stop loss at 1% from entry
  2. Members only
  3. Close a short when RSI(14) is below 45

Test conditions

PeriodUp to 2026-09-07
InstrumentDAX 40, 30 minutes
Spread3 points
Contracts1
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-09-07

Parameters

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

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run30 minn/a 3,72760.21-18,342 EUR-18,609
S&P 50030 minn/a 3,34460.32-2,217 EUR-2,769
S&P 5001 hourn/a 2,59956.79-2,351 EUR-2,920
Gold15 minn/a 3,10161.79-2,593 EUR-2,634
Gold5 minn/a 2,71460.57-2,970 EUR-3,098
Gold30 minn/a 3,36159.27-3,056 EUR-3,101
S&P 5005 minn/a 2,58259.99-3,301 EUR-3,716
S&P 50015 minn/a 3,23162.67-3,353 EUR-3,959
Gold1 hourn/a 2,66254.06-3,669 EUR-3,991
DAX 401 hourn/a 2,55554.44-9,649 EUR-12,339
DAX 4015 minn/a 3,23262.38-10,744 EUR-11,434
DAX 405 minn/a 2,65363.14-11,664 EUR-13,224
Nasdaq 1005 minn/a 2,78563.23-13,058 EUR-16,375
Nasdaq 10015 minn/a 3,52661.23-14,010 EUR-14,934
Nasdaq 10030 minn/a 3,63157.92-16,568 EUR-17,228
Nasdaq 1001 hourn/a 2,89050.42-16,571 EUR-16,786

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-20K-10KS&P 500 · 30 minS&P 500 · 1 hourGold · 15 minGold · 5 minGold · 30 minS&P 500 · 5 minS&P 500 · 15 minGold · 1 hourDAX 40 · 1 hourDAX 40 · 15 minDAX 40 · 5 minNasdaq 100 · 5 minNasdaq 100 · 15 minNasdaq 100 · 30 minNasdaq 100 · 1 hourDAX 40 · 30 min

The code

ProBuilder, rewritten to house standard

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

Known weaknesses

  • No run was profitable. The keyStats run on DAX 40 30 minutes ended at EUR -18,342.40 over 3,727 trades.
  • The win rate of 60.21% hides an average trade of EUR -4.92, because the stop losses are bigger than the small RSI exits.
  • Nasdaq 100 1 hour ended at EUR -16,571.40, so faster markets did worse.
  • Profit factor was not recorded, since only sweep data exists.

Indicators used

RSI

How to load it

  1. Copy the code with the copy button above the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Questions

About this strategy

Can I run it in ProOrder?

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.

How did each market do?

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.

What drawdown does 1 contract bring?

On DAX 40 30 minutes the maximum drawdown was EUR 18,608.80. Nasdaq 100 30 minutes reached EUR 17,227.60.

Why test RSI on intraday charts?

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

Strategies like this one

Stochastic Extreme Reversal

Uses the same indicator.

3.94 PF · 974 trades

Buy After Price Fall

Best run on the same market, DAX 40.

1.88 PF · 312 trades

Monday Dip Buy

Also a mean reversion strategy.

n/a PF · 146 trades

See which RSI variants actually made money. Get on the ProRealAlgos waitlist.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs