Tested by BacktestingMax
Best RSI settings: 24 RSI settings backtested on 6 markets
What are the best RSI settings?
No RSI setting was clearly best in our backtest: none made money in more than half of its tests. RSI is an indicator that scores how hard price has moved, from 0 to 100. Its period is the number of candles it looks back over. We tested the classic RSI strategy: buy when RSI comes back up above a low level, and sell short when it comes back down below a high level. We tried 6 periods (2, 5, 7, 9, 14 and 21) with 4 pairs of levels (10/90, 20/80, 25/75 and 30/70): 24 settings. Each setting ran 18 tests: 6 markets on 15-minute, 1-hour and 4-hour charts, from 2019 to 2025, after trading costs. 17 settings made at least 100 trades in every test. None of these 17 made money in more than 5 out of 18 tests. To pick a best setting, we used 2019–2022 only. In those years, RSI 9 at 30/70 made money in the most tests: 6 out of 18. In 2023–2025, it made money in 4 out of 18, the same as the standard RSI 14 at 30/70, so its lead did not hold. On 15-minute charts, 16 of the 17 settings lost money on all 6 markets.
18 backtests 2019–2025 Trading costs included Tested 23 November 2026
Where it worked 18 backtests- Made money
- 4 of 18 tests, with RSI 9 at 30/70 (the setting we picked using 2019–2022)
- Made money in both periods
- 3 2019–2022 and again 2023–2025
- Best backtest
- +62% S&P 500, 1-hour chart: account growth 2019–2025
Made money in both periods
- GBP/USD, 4-hour
- USD/JPY, 4-hour
- S&P 500, 1-hour
Lost money on every market
- 15-minute charts
The results
Results on every market
Each box shows one backtest of the RSI overbought/oversold strategy with RSI 9 at 30/70 (the setting we picked using 2019–2022), from 2019 to 2025, after trading costs: the % result, and a small chart of the account balance. The solid line is the account balance and the dashed line is the starting balance. Green results made money; red results lost money. Under each result: whether it made money in both 2019–2022 and 2023–2025, or passed all four of our checks (see "How a test passes" further down).
| Market | 15-minute | 1-hour | 4-hour |
|---|---|---|---|
| EUR/USD | −91% Lost money. Account down 90% by May 2024 | −85% Lost money | +28% Made money overall, lost in one period |
| GBP/USD | −99% Lost money. Account down 90% by Jan 2021 | −31% Lost money | +10% Made money in both periods |
| USD/JPY | −99% Lost money. Account down 90% by Dec 2020 | −43% Lost money | +36% Made money in both periods |
| Gold | −97% Lost money. Account down 90% by Apr 2020 | −67% Lost money | −22% Lost money |
| S&P 500 | −85% Lost money | +62% Made money in both periods | −10% Lost money |
| Nasdaq 100 | −77% Lost money | −18% Lost money | −17% Lost money |
All the numbers, test by test
| Market | Chart | Trades | Win rate | Profit factor | Result | Max drawdown | 2019–2022 | 2023–2025 | Monte Carlo drawdown | Trading costs |
|---|---|---|---|---|---|---|---|---|---|---|
| EUR/USD | 15-minute | 6,792 | 38.6% | 0.93 | −91.4% | −94.5% | −82.6% | −50.9% | −96.5% | $13,925 |
| EUR/USD | 1-hour | 1,821 | 36% | 0.81 | −84.6% | −84.9% | −68.5% | −51.2% | −88.8% | $2,147 |
| EUR/USD | 4-hour | 463 | 39.7% | 1.09 | +28.2% | −17.6% | −3.1% | +32.3% | −30.9% | $753 |
| GBP/USD | 15-minute | 5,709 | 36.9% | 0.85 | −99.0% | −99.1% | −95.3% | −79.2% | −99.3% | $6,924 |
| GBP/USD | 1-hour | 1,794 | 38.6% | 0.97 | −31.4% | −47.1% | −25.7% | −7.6% | −66.1% | $4,878 |
| GBP/USD | 4-hour | 478 | 38.9% | 1.03 | +9.5% | −18.0% | +6.4% | +3.0% | −33.7% | $820 |
| USD/JPY | 15-minute | 6,447 | 37.5% | 0.82 | −98.8% | −98.8% | −96.6% | −63.6% | −99.2% | $6,824 |
| USD/JPY | 1-hour | 1,796 | 37.7% | 0.95 | −42.9% | −60.0% | −35.4% | −11.7% | −70.3% | $4,480 |
| USD/JPY | 4-hour | 481 | 41.6% | 1.11 | +35.7% | −17.8% | +16.4% | +16.5% | −29.4% | $770 |
| Gold | 15-minute | 3,091 | 35.9% | 0.72 | −97.2% | −97.4% | −96.6% | −18.1% | −97.8% | $6,022 |
| Gold | 1-hour | 1,661 | 37.7% | 0.88 | −67.2% | −73.5% | −58.2% | −21.5% | −77.8% | $3,147 |
| Gold | 4-hour | 460 | 37% | 0.92 | −22.0% | −34.5% | +9.4% | −28.8% | −41.6% | $665 |
| S&P 500 | 15-minute | 6,508 | 37.6% | 0.94 | −84.9% | −88.0% | −80.0% | −24.4% | −94.7% | $11,600 |
| S&P 500 | 1-hour | 1,861 | 38.4% | 1.05 | +62.0% | −33.2% | +2.7% | +57.7% | −54.0% | $4,375 |
| S&P 500 | 4-hour | 526 | 35.6% | 0.97 | −10.0% | −21.3% | +6.4% | −15.4% | −42.4% | $540 |
| Nasdaq 100 | 15-minute | 6,578 | 38.1% | 0.96 | −76.8% | −88.0% | −66.5% | −30.9% | −92.6% | $17,652 |
| Nasdaq 100 | 1-hour | 1,797 | 36.3% | 0.98 | −17.8% | −35.0% | +9.6% | −25.0% | −64.7% | $3,329 |
| Nasdaq 100 | 4-hour | 529 | 35.7% | 0.94 | −17.4% | −24.8% | −12.6% | −5.5% | −42.0% | $419 |
Profit factor is the money won divided by the money lost. Above 1 means the test made money. Max drawdown is the biggest fall from the highest balance. 2019–2022 and 2023–2025 show the result in each period on its own. Monte Carlo drawdown: we shuffled the trades into a random order 1,000 times; in 95% of those runs, the worst drawdown was this number or less. Result is the change in the account, with the risk of each trade set to 1% of the account at that time.
The account balance
The best test and the middle test
What we found
What the 18 backtests show
A shorter RSI period won more often, but it did not make more money. On 1-hour and 4-hour charts, RSI 2 at 30/70 won 64.9% of its trades, and RSI 14 at 30/70 won 25.8%. But the winning trades were much smaller with RSI 2. We measure trades in R: 1R is the amount a trade risked, 1% of the account when it opened. The average winning trade made 0.28R with RSI 2 and 2.63R with RSI 14. The average trade lost money with both: −0.022R with RSI 2 and −0.044R with RSI 14. But RSI 2 traded about 7 times as often: 1,074 trades a year on one market on 1-hour charts, against 146. So RSI 2 lost less on an average trade, but its many small losses added up to more, and RSI 2 at 30/70 lost money in all 18 of its tests.
On 15-minute charts, the charts many scalpers use, trading costs decided the result. Before costs, the trades of RSI 5 at 30/70 made more money than they lost on all 6 markets. The trades of RSI 2 did so on 4 or 5 of the 6 markets, with each pair of levels. After costs, all of these RSI 2 and RSI 5 tests lost money: each test's account lost at least 98% of its money. A short RSI period trades very often, and every trade pays the spread. Of the 17 settings with enough trades, only one made money on any 15-minute chart: RSI 21 at 30/70, on the S&P 500 (+5.5%).
The chart changed the result more than the setting. We counted the tests that made money from 2019 to 2025 with the 17 settings that made at least 100 trades in every test. That is 6 markets × 17 settings = 102 tests on each chart. On 4-hour charts, 33 out of 102 tests made money. On 1-hour charts, 7 out of 102 did, and on 15-minute charts, only 1 out of 102. On 4-hour charts, 15 of the 17 settings made money on at least 1 of the 6 markets.
With a long RSI period, the levels 10/90 almost never traded, and a few long trades decided the result. In 7 years, RSI 14 at 10/90 made 187 trades in its 18 tests together, and RSI 21 at 10/90 made only 25. A buy stays open until RSI reaches the high level, and a sell until RSI reaches the low level, unless the stop-loss is hit first. So some trades stayed open for months. With RSI 14 at 10/90, one S&P 500 buy on a 15-minute chart was open from December 2022 to June 2024 and made 99.6R. Without its 3 best trades, that setting's 187 trades lost 110.0R. 7 of the 24 settings made fewer than 100 trades in at least one test, so we left them out when we picked the best setting.
All 24 settings
No RSI setting made money in more than 8 of its 18 tests
Each cell counts the tests, out of 18, where that setting made money from 2019 to 2025, after trading costs: 6 markets on 15-minute, 1-hour and 4-hour charts. In brackets: the tests with fewer than 100 trades, too few to judge.
| RSI period | Levels 10/90 | Levels 20/80 | Levels 25/75 | Levels 30/70 |
|---|---|---|---|---|
| RSI 2 | 1 of 18 | 2 of 18 | 2 of 18 | 0 of 18 |
| RSI 5 | 4 of 18 | 2 of 18 | 0 of 18 | 1 of 18 |
| RSI 7 | 5 of 18 (6 with under 100 trades) | 2 of 18 | 4 of 18 | 1 of 18 |
| RSI 9 | 6 of 18 (12 with under 100 trades) | 3 of 18 | 3 of 18 | 4 of 18 |
| RSI 14 | 4 of 18 (all 18 with under 100 trades) | 5 of 18 (6 with under 100 trades) | 4 of 18 | 3 of 18 |
| RSI 21 | 2 of 18 (all 18 with under 100 trades) | 8 of 18 (12 with under 100 trades) | 3 of 18 (6 with under 100 trades) | 5 of 18 |
The highest count, 8 out of 18 for RSI 21 at 20/80, means little: 12 of its 18 tests made fewer than 100 trades in 7 years. Its 1,402 trades lost 30.7R in total. Without its 3 best trades, they would have lost 164.2R.
Win rate or result?
A shorter RSI period won more often, but its winning trades were small
All 6 RSI periods with the levels 30/70, on 1-hour and 4-hour charts, from 2019 to 2025. R is the amount a trade risked: 1% of the account when it opened. The win rate and the R figures add up the trades of all 12 tests on these two charts.
| RSI period | Win rate | Average winning trade | Average trade | Trades a year on one market, 1-hour chart | Tests that made money, out of 18 |
|---|---|---|---|---|---|
| RSI 2 | 64.9% | 0.28R | −0.022R | 1,074 | 0 |
| RSI 5 | 53.9% | 0.76R | −0.026R | 468 | 1 |
| RSI 7 | 44.3% | 1.15R | −0.030R | 331 | 1 |
| RSI 9 | 37.6% | 1.58R | −0.017R | 255 | 4 |
| RSI 14 | 25.8% | 2.63R | −0.044R | 146 | 3 |
| RSI 21 | 17.7% | 4.16R | −0.067R | 73 | 5 |
The last column counts all 18 tests of each setting, including the 15-minute charts. The average losing trade lost 0.58R with RSI 2, and 0.94R to 0.98R with the other periods. RSI 2 often reached the other level and closed a trade before the stop-loss, even when the trade was losing. Only 18.8% of its trades on these charts hit the stop-loss, against 74.2% with RSI 14.
Daily charts
On daily charts, from 2005 to 2025, no setting made money on more than 3 of 5 markets
We ran all 24 settings on daily charts of 5 markets: EUR/USD, GBP/USD, USD/JPY, AUD/USD and gold, from 2005 to 2025, after trading costs. Each cell counts the markets, out of 5, where that setting made money. In brackets: the number of trades in one test, from the fewest to the most.
| RSI period | Levels 10/90 | Levels 20/80 | Levels 25/75 | Levels 30/70 |
|---|---|---|---|---|
| RSI 2 | 1 of 5 (499–537 trades) | 2 of 5 (740–807 trades) | 2 of 5 (786–926 trades) | 1 of 5 (860–1,003 trades) |
| RSI 5 | 2 of 5 (41–61 trades) | 2 of 5 (223–234 trades) | 1 of 5 (319–346 trades) | 1 of 5 (420–442 trades) |
| RSI 7 | 3 of 5 (12–22 trades) | 2 of 5 (100–130 trades) | 1 of 5 (197–207 trades) | 2 of 5 (286–302 trades) |
| RSI 9 | 1 of 5 (2–7 trades) | 3 of 5 (54–74 trades) | 2 of 5 (116–139 trades) | 2 of 5 (202–215 trades) |
| RSI 14 | 0 of 5 (no trades) | 3 of 5 (6–24 trades) | 2 of 5 (41–61 trades) | 1 of 5 (94–119 trades) |
| RSI 21 | 0 of 5 (no trades) | 1 of 5 (1–8 trades) | 1 of 5 (6–23 trades) | 1 of 5 (42–62 trades) |
RSI 2 made the most trades on daily charts and won 58% to 68% of them, depending on the levels. Its average trade still lost 0.010R to 0.015R. USD/JPY was the only market where RSI 2 made money with all 4 pairs of levels. With the standard RSI 14 at 30/70, each market made only 94 to 119 trades in 21 years.
The strategy
What the RSI overbought/oversold strategy is
RSI (Relative Strength Index) is an indicator that scores how hard price has moved, from 0 to 100. It compares the size of the up moves with the size of the down moves over the last few candles. The number of candles is the RSI period. The standard period is 14. A common way to trade RSI uses two levels. When RSI is under the low level, the market is called oversold, and when RSI is over the high level, it is called overbought. The classic strategy buys once RSI comes back up above the low level, and sells short once RSI comes back down below the high level. The standard levels are 30 and 70. Traders change these settings all the time. A short period, like RSI 2, reacts to the last two or three candles, so it reaches the levels often. A long period, like RSI 21, moves slowly and reaches them less often. Levels further out, like 10/90, wait for bigger moves than 30/70. We tested 24 settings with the same rules, the rules from our RSI 30/70 page. Only the period and the levels change.
- RSI settings
- 6 periods (2, 5, 7, 9, 14 and 21 candles) with 4 pairs of levels (10/90, 20/80, 25/75 and 30/70): 24 settings. RSI uses closing prices and Wilder's formula, the one most charting apps use. The results grid shows RSI 9 at 30/70. Of the 17 settings with at least 100 trades in every test, it made money in the most tests in 2019–2022. The table under 'Can the RSI overbought/oversold strategy be improved?' compares those 17. As on our RSI 30/70 page, no test trades in its first 200 candles, so every setting trades the same dates.
- What we tested
- Every setting ran the same 18 tests: EUR/USD, GBP/USD, USD/JPY, gold, the S&P 500 and the Nasdaq 100, each on 15-minute, 1-hour and 4-hour charts, from 1 January 2019 to 31 December 2025. That is 432 tests. We call 2019–2022 the older years and 2023–2025 the newer years. We also ran all 24 settings on daily charts of EUR/USD, GBP/USD, USD/JPY, AUD/USD and gold, from 2005 to 2025: 120 more tests (see 'Daily charts' below).
- Stop-loss
- 2 × ATR(14), set when the trade opens. ATR is how far price moves in an average candle, here Wilder's average over 14 candles. Every setting uses the same stop-loss rule.
- Take-profit
- No fixed take-profit. A buy closes when RSI reaches the high level, and a sell closes when RSI reaches the low level.
- Risk per trade
- 1% of the account at that time. The account started at $10,000. The trade size is rounded down to a size the market allows. Because of this, about 1 trade in 4 with RSI 9 at 30/70 risked less than 0.9%, mostly on 15-minute charts after the account had shrunk. A trade can be worth at most 30 times the account, on every market (this is the leverage limit). When the stop-loss is very close, a 1% risk would need a bigger trade than that, so the trade is cut to the limit and risks less than 1%. We counted these cut trades for two settings. With RSI 9 at 30/70, it happened to 18 out of 48,792 trades. With RSI 14 at 30/70, it happened to 11 out of 28,399. All of them were on 15-minute charts.
- Trading costs
- The only trading cost we charged is the spread: the gap between the buy price and the sell price. The spread is 0.8 pips on EUR/USD, 1.2 on GBP/USD, 0.9 on USD/JPY and 1.0 on AUD/USD (a pip is 0.0001, or 0.01 on USD/JPY). On gold, it is $0.30 an ounce. On the S&P 500, it is 0.4 points. On the Nasdaq 100, it is 1.5 points, wider than our backtest engine's default, to match a typical retail broker. The rules use only market orders and stop-losses, so every trade pays half the spread when it opens and half when it closes. There is no commission.
- Smallest trade size
- Each market has a smallest trade: 1,000 units of a currency pair, 1 ounce of gold, or 0.1 of an index contract. When the trade that risks 1% would be smaller than that, the test skips the signal. We counted this for two settings. While an account still had at least half of its starting balance, RSI 9 at 30/70 skipped 12 signals and RSI 14 at 30/70 skipped 3. All were gold and Nasdaq 100 signals on 4-hour charts in 2025. Tests whose account had already lost more than half of its money skipped many more signals. RSI 9 at 30/70 skipped 7,558 and RSI 14 at 30/70 skipped 999, almost all on 15-minute charts. So those tests traded less after the account had shrunk.
- Overnight (swap) fees
- Not included. Brokers charge (or sometimes pay) a fee for each night a trade stays open. With RSI 9 at 30/70, half of the trades closed within 3.2 hours on 15-minute charts, 15 hours on 1-hour charts and 64 hours on 4-hour charts. A shorter RSI period closed trades sooner: with RSI 2 at 30/70, half closed within 8 hours on 4-hour charts. A longer period kept them open longer: with RSI 21 at 30/70, half closed within 105 hours on 4-hour charts. So these fees could change the results most for long periods on 4-hour charts, and they could make a result better or worse.
- Price data
- We used CFD prices. A CFD (contract for difference) is a contract with a broker that pays the change in a market's price. Most brokers outside the US offer CFDs for trading these markets. The tests on 15-minute, 1-hour and 4-hour charts start in 2019. Our index data before 2019 has hours where the price did not update, so trades could fill at prices that were not really there.
The rules we tested
- Choose a setting: an RSI period and a pair of levels, for example RSI 14 at 30/70. All 24 settings use the same rules.
- Buy when RSI crosses back above the low level: RSI was below it when the previous candle closed, and is at the level or higher when this candle closes.
- Sell short when RSI crosses back below the high level: RSI was above it when the previous candle closed, and is at the level or lower when this candle closes.
- Close a buy when a candle closes with RSI at the high level or higher. Close a sell when a candle closes with RSI at the low level or lower. Entries and these exits happen at the opening price of the next candle.
- ATR is an indicator of how far price moves in an average candle, measured over the last 14 candles. Put the stop-loss 2 times the signal candle's ATR below that candle's closing price for a buy, or above it for a sell. The stop-loss does not move. If price reaches it, the trade closes at the stop price, or at a worse price if price gaps past it (opens beyond it).
- After a stop-loss, a new trade needs a new signal on a later candle. Only one trade is open at a time: a signal that comes while a trade is open is ignored.
- Size every trade so that, if the stop-loss is hit, the trade loses 1% of the account.
The method
How we tested it
The test
- Markets
- EUR/USD, GBP/USD, USD/JPY, Gold, S&P 500 and Nasdaq 100
- Charts
- 15-minute, 1-hour and 4-hour candles
- Dates
- January 2019 to December 2025
- Account
- $10,000, risking 1% of the account on each trade
- Trading costs
- Included. Every trade pays that market's normal trading cost: the spread, which is the gap between the buy price and the sell price.
How a test passes
We call a test passed only if it meets all four checks. A strategy can make money in one backtest and still fail one of these checks.
- At least 100 trades. With fewer trades, a good result could be luck.
- It made money from 2019 to 2022 and again from 2023 to 2025. This shows whether the strategy kept working in the newer years, not only in the older ones.
- A profit factor (the money won divided by the money lost) of at least 1.2 from 2023 to 2025, after trading costs.
- In 95% of 1,000 random shuffles of the trades, the account must not fall more than 30% from its highest point.
Improvements
Can the RSI overbought/oversold strategy be improved?
Here, improving the RSI strategy means choosing a better setting. Each row is one setting, run with the same rules on the same 18 tests. We left out the 7 settings that made fewer than 100 trades in at least one test, because a test needs at least 100 trades to judge (see the table 'All 24 settings' above). A setting picked as the best of 17 on some years will look good on those years, because it was picked for that. So we picked the best setting using 2019–2022 only: the one that made money in the most tests. Then we checked it on 2023–2025, the years we did not use to pick it.
| Version | Made money 2019–2022years used to pick the best version | Made money 2023–2025years not used to pick it | Made money in both periods | Passed all four checks |
|---|---|---|---|---|
| RSI 2, levels 10/90 RSI over 2 candles. Buy when RSI comes back above 10, and sell short when it comes back below 90. | 2 of 18middle test −60.0% | 2 of 18middle test −29.4% | 0 | 0 |
| RSI 2, levels 20/80 RSI over 2 candles. Buy when RSI comes back above 20, and sell short when it comes back below 80. | 2 of 18middle test −74.6% | 2 of 18middle test −12.6% | 1 | 0 |
| RSI 2, levels 25/75 RSI over 2 candles. Buy when RSI comes back above 25, and sell short when it comes back below 75. | 3 of 18middle test −73.8% | 2 of 18middle test −16.0% | 2 | 0 |
| RSI 2, levels 30/70 RSI over 2 candles. Buy when RSI comes back above 30, and sell short when it comes back below 70. It made the most trades of all 24 settings. | 3 of 18middle test −71.1% | 1 of 18middle test −18.9% | 0 | 0 |
| RSI 5, levels 10/90 RSI over 5 candles. Buy when RSI comes back above 10, and sell short when it comes back below 90. | 3 of 18middle test −31.6% | 5 of 18middle test −16.4% | 2 | 2 |
| RSI 5, levels 20/80 RSI over 5 candles. Buy when RSI comes back above 20, and sell short when it comes back below 80. | 2 of 18middle test −48.6% | 4 of 18middle test −18.6% | 0 | 0 |
| RSI 5, levels 25/75 RSI over 5 candles. Buy when RSI comes back above 25, and sell short when it comes back below 75. | 0 of 18middle test −56.0% | 3 of 18middle test −21.4% | 0 | 0 |
| RSI 5, levels 30/70 RSI over 5 candles. Buy when RSI comes back above 30, and sell short when it comes back below 70. | 1 of 18middle test −51.1% | 4 of 18middle test −20.2% | 0 | 0 |
| RSI 7, levels 20/80 RSI over 7 candles. Buy when RSI comes back above 20, and sell short when it comes back below 80. | 3 of 18middle test −35.5% | 4 of 18middle test −15.6% | 1 | 1 |
| RSI 7, levels 25/75 RSI over 7 candles. Buy when RSI comes back above 25, and sell short when it comes back below 75. | 3 of 18middle test −46.2% | 5 of 18middle test −19.5% | 1 | 0 |
| RSI 7, levels 30/70 RSI over 7 candles. Buy when RSI comes back above 30, and sell short when it comes back below 70. | 1 of 18middle test −47.5% | 5 of 18middle test −31.1% | 0 | 0 |
| RSI 9, levels 20/80 RSI over 9 candles. Buy when RSI comes back above 20, and sell short when it comes back below 80. | 3 of 18middle test −39.6% | 6 of 18middle test −17.2% | 2 | 0 |
| RSI 9, levels 25/75 RSI over 9 candles. Buy when RSI comes back above 25, and sell short when it comes back below 75. | 4 of 18middle test −42.7% | 5 of 18middle test −25.4% | 3 | 0 |
| RSI 9, levels 30/70Best on 2019–2022 RSI over 9 candles. Buy when RSI comes back above 30, and sell short when it comes back below 70. | 6 of 18middle test −30.5% | 4 of 18middle test −19.8% | 3 | 0 |
| RSI 14, levels 25/75 RSI over 14 candles, the standard period. Buy when RSI comes back above 25, and sell short when it comes back below 75. | 4 of 18middle test −26.6% | 7 of 18middle test −9.6% | 2 | 2 |
| RSI 14, levels 30/70 (the standard settings) RSI over 14 candles. Buy when RSI comes back above 30, and sell short when it comes back below 70. These are the settings most traders learn first, and the ones on our RSI 30/70 page. | 4 of 18middle test −45.0% | 4 of 18middle test −15.3% | 2 | 0 |
| RSI 21, levels 30/70 RSI over 21 candles, the slowest period we tested. Buy when RSI comes back above 30, and sell short when it comes back below 70. | 3 of 18middle test −22.4% | 6 of 18middle test −16.9% | 1 | 0 |
Choosing the RSI setting from past results did not make the strategy work. In 2019–2022, the years we used to pick, RSI 9 at 30/70 made money in 6 out of 18 tests, the most of the 17 settings. The standard RSI 14 at 30/70 made money in 4. In 2023–2025, the years we did not use to pick, RSI 9 at 30/70 made money in 4 out of 18, the same as RSI 14 at 30/70. In 2023–2025, the middle test of RSI 9 at 30/70 (the median of its 18 results) lost 19.8%. The middle test of RSI 14 at 30/70 lost 15.3%. In 2023–2025, the setting that made money in the most tests was RSI 14 at 25/75: 7 out of 18. But in 2019–2022 it had made money in only 4. RSI 9 at 30/70 made money in both periods in 3 tests: GBP/USD and USD/JPY on 4-hour charts, and the S&P 500 on 1-hour charts.
Questions
Questions traders ask
What are the best RSI settings?
No setting was clearly best in our backtest. We tested 24 RSI settings: periods 2, 5, 7, 9, 14 and 21, each with the levels 10/90, 20/80, 25/75 and 30/70. Each setting ran 18 tests: 6 markets on 15-minute, 1-hour and 4-hour charts, from 2019 to 2025, after trading costs. Of the 17 settings with at least 100 trades in every test, none made money in more than 5 out of 18. RSI 9 at 30/70 made money in the most tests in 2019–2022, 6 out of 18, but in 2023–2025 it made money in 4, the same as the standard RSI 14 at 30/70.
What are the best RSI settings for scalping?
In our test, no RSI setting made money on most markets on 15-minute charts. Of the 17 settings with enough trades, 16 lost money on all 6 markets from 2019 to 2025, after trading costs. The one exception was RSI 21 at 30/70, on the S&P 500 only. Short periods are popular for scalping, but with RSI 2, every 15-minute account lost at least 98% of its money, with every pair of levels. Before costs, RSI 5 at 30/70 made more than it lost on all 6 markets. The spread on each of its many trades turned that into a loss. We did not test 1-minute or 5-minute charts.
Is RSI 2 better than RSI 14?
No, not in our test. RSI 2 at 30/70 won 64.9% of its trades on 1-hour and 4-hour charts, and RSI 14 at 30/70 won 25.8%. But RSI 2's winning trades were small, 0.28R on average against 2.63R, where 1R is the amount a trade risked. RSI 2 traded about 7 times as often, so its small average loss per trade added up. RSI 2 at 30/70 lost money in all 18 tests, and RSI 14 at 30/70 in 15 of 18. On daily charts of 5 markets from 2005 to 2025, RSI 2 made money on only 1 or 2 of the 5 markets with each pair of levels.
Should you use RSI levels 20/80 or 30/70?
In our test, neither was clearly better. Levels further out, like 20/80, gave far fewer trades. With RSI 14, the 18 tests made 28,399 trades at 30/70, 14,662 at 25/75, 5,750 at 20/80 and only 187 at 10/90. RSI 14 at 30/70 made money in 3 of its 18 tests, and RSI 14 at 20/80 in 5, but 6 of those 18 tests made fewer than 100 trades, too few to judge. With the short periods, the levels changed little: RSI 2 made money in 0 to 2 of 18 tests with every pair of levels.
Keep exploring
Related strategies we tested
RSI RSI + 50 EMA strategy backtest Made money in 4 of 24 tests, 2 of them in both periods. Best: Nasdaq 100, 1-hour, +40% RSI RSI + Bollinger Bands strategy backtest Made money in 5 of 30 tests, 4 of them in both periods. Best: EUR/GBP, 4-hour, +35% RSI RSI overbought/oversold strategy backtest Made money in 4 of 24 tests, 2 of them in both periods. Best: DAX, 1-hour, +92% RSI RSI divergence strategy backtest Made money in 5 of 24 tests, 2 of them in both periods. Best: DAX, 1-hour, +49%The strategy code we ran
This is the exact code from the BacktestingMax strategy engine. Paste it into the strategy editor in the app to run it on any market.
class BestRsiSettings(Strategy):
"""Best RSI settings: the classic RSI overbought/oversold strategy, run with 24 settings.
The rules are the RSI 30/70 page's rules, word for word; only rsi_period, oversold and
overbought change from run to run (periods 2, 5, 7, 9, 14, 21 x levels 10/90, 20/80,
25/75, 30/70). Buy when RSI crosses back above the oversold level (it closed below it on
the candle before). Sell short when it crosses back below the overbought level. Close a buy
when RSI reaches the overbought level and a sell when RSI reaches the oversold level; the
exit fills at the next candle's open. A stop 2 x ATR(14) from the entry caps every trade,
sized so the stop costs 1% of the account. One trade at a time: a signal while a trade is
open is ignored. Trading starts once the 200 EMA has enough candles (as on the RSI 30/70
page), so every setting trades the same dates.
The other switches (all off here) are the RSI 30/70 page's changes, kept so the code is
the same as that page's:
early_entry = 1 buy as soon as RSI crosses below the oversold level
exit_mid = 1 close at RSI 50 instead of at the other level
trend_filter = 1 only buy above the 200 EMA, only sell below it
adx_filter = 1 only trade when ADX(14) is below 25
"""
params = {"rsi_period": Param(type=int, default=14, min=2, max=100),
"oversold": Param(type=float, default=30.0, min=1.0, max=49.0),
"overbought": Param(type=float, default=70.0, min=51.0, max=99.0),
"atr_mult": Param(type=float, default=2.0, min=0.5, max=5.0),
"early_entry": Param(type=int, default=0, min=0, max=1),
"exit_mid": Param(type=int, default=0, min=0, max=1),
"trend_filter": Param(type=int, default=0, min=0, max=1),
"adx_filter": Param(type=int, default=0, min=0, max=1),
"adx_max": Param(type=float, default=25.0, min=5.0, max=60.0)}
lookback = 50
def init(self, ctx):
self.rsi = ctx.indicator("builtin:rsi", period=ctx.params.rsi_period)
self.atr = ctx.atr(period=14)
self.ema = ctx.ema(source=ctx.close, period=200)
self.adx = ctx.indicator("builtin:adx", period=14)
self.reverse_to = None # "long" / "short": open this once the closing trade is gone
def on_bar(self, ctx):
p = ctx.params
r0, r1 = self.rsi.rsi[0], self.rsi.rsi[1]
a, ema, adx = self.atr.value, self.ema.value, self.adx.adx[0]
if r0 is None or r1 is None or a is None or ema is None or adx is None:
return
low, high = p.oversold, p.overbought
if p.early_entry == 1:
buy_signal = r1 >= low and r0 < low # RSI drops into oversold
sell_signal = r1 <= high and r0 > high # RSI rises into overbought
else:
buy_signal = r1 < low and r0 >= low # RSI crosses back above 30
sell_signal = r1 > high and r0 <= high # RSI crosses back below 70
exit_long = 50.0 if p.exit_mid == 1 else high
exit_short = 50.0 if p.exit_mid == 1 else low
pos = ctx.position
if pos is not None:
if pos.is_long and r0 >= exit_long:
ctx.close_position()
self.reverse_to = "short" if sell_signal else None
elif pos.is_short and r0 <= exit_short:
ctx.close_position()
self.reverse_to = "long" if buy_signal else None
return
# A reversal (only possible with early_entry) waits one candle for the close to fill.
# Drop it if RSI has already left the zone.
pending, self.reverse_to = self.reverse_to, None
if pending == "long" and r0 < low:
buy_signal = True
if pending == "short" and r0 > high:
sell_signal = True
entry = ctx.close[0]
calm = p.adx_filter == 0 or adx < p.adx_max
long_ok = p.trend_filter == 0 or entry > ema
short_ok = p.trend_filter == 0 or entry < ema
if ctx.gate("rsi_buy_signal", buy_signal) and ctx.gate("trend_long", long_ok) and ctx.gate("adx_long", calm):
stop = entry - p.atr_mult * a
ctx.buy(size=ctx.size_by_risk_pct(0.01, stop=stop, entry=entry), sl=stop, tag="rsi_long")
elif ctx.gate("rsi_sell_signal", sell_signal) and ctx.gate("trend_short", short_ok) and ctx.gate("adx_short", calm):
stop = entry + p.atr_mult * a
ctx.sell(size=ctx.size_by_risk_pct(0.01, stop=stop, entry=entry), sl=stop, tag="rsi_short")
Your turn
Test the RSI overbought/oversold strategy yourself
Change the settings, the market or the stop-loss and see the result in seconds. Ask the BacktestingMax AI: Backtest the RSI overbought/oversold strategy with RSI 9 at 30/70 and with RSI 14 at 30/70 on USD/JPY, 4-hour chart, from 2019 to 2025, with a stop-loss at 2 times ATR(14), and compare the results
.
Free account. No credit card needed.
See every strategy we tested Browse strategies shared by tradersBacktest on historical data with trading costs, run by BacktestingMax. Past results do not guarantee future results, and nothing here is financial advice. Updated 23 November 2026.