Tested by BacktestingMax
RSI + Bollinger Bands strategy backtest
Does the RSI + Bollinger Bands strategy make money?
Mostly no: with the standard rules described below, it lost money in 25 of our 30 backtests, after trading costs. We tested 10 markets (5 currency pairs, gold, silver and 3 stock indices) on 15-minute, 1-hour and 4-hour charts, from 2020 to 2025. Why does it lose money? Even before trading costs, the average trade was close to zero on every chart. After costs, it lost money on 15-minute and 1-hour charts and made almost nothing on 4-hour charts. All 5 tests that made money were on 4-hour charts, and 4 of them made money in both 2020–2023 and 2024–2025: EUR/GBP, EUR/USD, GBP/USD and gold. Does RSI help the Bollinger Bands? It helped mostly because it traded less. On 1-hour and 4-hour charts, the bands with RSI took 9,280 trades instead of 24,279, so they lost less in total. The trades they kept won less often (48.4%, compared with 51.1%), and the average trade was a small loss either way. RSI helped most on GBP/USD, EUR/USD and EUR/GBP, and hurt most on the Nasdaq 100 and the S&P 500.
30 backtests 2020–2025 Trading costs included Tested 2 November 2026
Where it worked 30 backtests- Made money
- 5 of 30 tests, with the standard rules
- Made money in both periods
- 4 2020–2023 and again 2024–2025
- Best backtest
- +35% EUR/GBP, 4-hour chart: account growth 2020–2025
- Also wait for RSI to cross back over 30 or 70
- 2 tests made money in both periods, compared with 4 with the standard rules
Made money in both periods
- EUR/USD, 4-hour
- GBP/USD, 4-hour
- EUR/GBP, 4-hour
- Gold, 4-hour
Lost money on every market
- 15-minute charts
- 1-hour charts
The results
Results on every market
Each box shows one backtest of the RSI + Bollinger Bands strategy with the standard rules, from 2020 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 2020–2023 and 2024–2025, or passed all four of our checks (see "How a test passes" further down).
| Market | 15-minute | 1-hour | 4-hour |
|---|---|---|---|
| EUR/USD | −89% Lost money | −1% Lost money | +17% Passed all four checks |
| GBP/USD | −92% Lost money. Account down 90% by Mar 2025 | −5% Lost money | +13% Made money in both periods |
| USD/JPY | −95% Lost money. Account down 90% by Jun 2024 | −71% Lost money | −6% Lost money |
| AUD/USD | −89% Lost money. Account down 90% by Oct 2025 | −9% Lost money | −6% Lost money |
| EUR/GBP | −98% Lost money. Account down 90% by Jan 2023 | −56% Lost money | +35% Passed all four checks |
| Gold | −91% Lost money. Account down 90% by Feb 2025 | −45% Lost money | +7% Made money in both periods |
| Silver | −96% Lost money. Account down 90% by Sept 2022 | −66% Lost money | −27% Lost money |
| Nasdaq 100 | −75% Lost money | −43% Lost money | −16% Lost money |
| S&P 500 | −87% Lost money | −44% Lost money | −7% Lost money |
| DAX | −74% Lost money | −29% Lost money | +1% Made money overall, lost in one period |
All the numbers, test by test
| Market | Chart | Trades | Win rate | Profit factor | Result | Max drawdown | 2020–2023 | 2024–2025 | Monte Carlo drawdown | Trading costs |
|---|---|---|---|---|---|---|---|---|---|---|
| EUR/USD | 15-minute | 2,688 | 45.6% | 0.87 | −88.8% | −89.5% | −72.5% | −59.4% | −92.0% | $9,629 |
| EUR/USD | 1-hour | 728 | 52.2% | 1.00 | −1.4% | −29.3% | −13.7% | +14.3% | −37.5% | $2,417 |
| EUR/USD | 4-hour | 176 | 50.6% | 1.20 | +16.7% | −15.2% | +5.6% | +10.5% | −16.8% | $320 |
| GBP/USD | 15-minute | 2,723 | 44.8% | 0.82 | −92.2% | −92.6% | −85.2% | −47.3% | −94.1% | $7,493 |
| GBP/USD | 1-hour | 784 | 52.7% | 0.98 | −5.4% | −24.9% | +4.4% | −9.4% | −39.0% | $3,023 |
| GBP/USD | 4-hour | 168 | 50.6% | 1.14 | +13.0% | −14.5% | +9.4% | +3.3% | −16.9% | $383 |
| USD/JPY | 15-minute | 2,842 | 45.1% | 0.77 | −94.9% | −95.4% | −88.7% | −55.0% | −96.3% | $6,410 |
| USD/JPY | 1-hour | 829 | 43.5% | 0.70 | −70.9% | −71.9% | −57.7% | −31.1% | −75.2% | $1,581 |
| USD/JPY | 4-hour | 202 | 44.6% | 0.94 | −5.9% | −22.6% | −10.8% | +5.5% | −25.0% | $308 |
| AUD/USD | 15-minute | 2,595 | 47.3% | 0.80 | −89.0% | −90.7% | −85.4% | −24.4% | −91.8% | $7,693 |
| AUD/USD | 1-hour | 724 | 51% | 0.97 | −8.9% | −46.2% | −24.5% | +20.7% | −39.9% | $2,873 |
| AUD/USD | 4-hour | 160 | 47.5% | 0.93 | −5.5% | −17.4% | −10.1% | +5.0% | −21.5% | $377 |
| EUR/GBP | 15-minute | 2,334 | 44.4% | 0.71 | −98.1% | −98.3% | −94.3% | −67.5% | −98.4% | $7,738 |
| EUR/GBP | 1-hour | 717 | 50.9% | 0.77 | −55.8% | −56.1% | −30.8% | −36.1% | −62.6% | $3,929 |
| EUR/GBP | 4-hour | 156 | 55.8% | 1.42 | +35.3% | −8.1% | +20.8% | +11.9% | −12.4% | $779 |
| Gold | 15-minute | 2,460 | 46.2% | 0.77 | −91.4% | −91.8% | −82.5% | −50.9% | −93.1% | $5,792 |
| Gold | 1-hour | 747 | 49% | 0.83 | −44.6% | −48.8% | −30.9% | −19.8% | −54.4% | $1,915 |
| Gold | 4-hour | 212 | 47.2% | 1.07 | +6.9% | −8.6% | +4.9% | +1.8% | −19.4% | $349 |
| Silver | 15-minute | 1,558 | 45.9% | 0.58 | −96.1% | −96.2% | −95.4% | −13.8% | −96.4% | $8,368 |
| Silver | 1-hour | 629 | 44.7% | 0.64 | −65.8% | −65.8% | −54.0% | −25.6% | −68.9% | $3,071 |
| Silver | 4-hour | 195 | 43.6% | 0.68 | −27.2% | −28.4% | −24.3% | −3.8% | −33.6% | $702 |
| Nasdaq 100 | 15-minute | 2,773 | 44.9% | 0.89 | −75.3% | −76.8% | −55.3% | −44.8% | −84.3% | $6,025 |
| Nasdaq 100 | 1-hour | 769 | 48.1% | 0.84 | −43.4% | −49.4% | −38.2% | −8.3% | −54.7% | $1,074 |
| Nasdaq 100 | 4-hour | 193 | 42.5% | 0.83 | −15.6% | −26.9% | −15.7% | +0.1% | −28.5% | $167 |
| S&P 500 | 15-minute | 2,687 | 44.3% | 0.84 | −86.9% | −88.0% | −77.9% | −40.7% | −90.6% | $5,329 |
| S&P 500 | 1-hour | 760 | 47% | 0.83 | −44.1% | −57.5% | −47.4% | +6.1% | −57.0% | $1,194 |
| S&P 500 | 4-hour | 197 | 43.7% | 0.94 | −6.9% | −20.9% | +3.2% | −9.8% | −26.0% | $255 |
| DAX | 15-minute | 2,620 | 45.5% | 0.92 | −73.7% | −80.9% | −62.7% | −29.6% | −83.0% | $5,051 |
| DAX | 1-hour | 749 | 48.6% | 0.90 | −28.6% | −35.4% | −26.9% | −2.3% | −47.8% | $827 |
| DAX | 4-hour | 185 | 44.9% | 1.02 | +1.3% | −12.8% | −4.0% | +5.5% | −19.9% | $123 |
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. 2020–2023 and 2024–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 30 backtests show
The strategy made money only on 4-hour charts: in 5 of the 10 tests there, from +1.3% (the DAX) to +35.3% (EUR/GBP), from 2020 to 2025. 4 of them made money in both 2020–2023 and 2024–2025: EUR/GBP, EUR/USD, GBP/USD and gold. EUR/GBP and EUR/USD also passed all four of our checks (see 'How a test passes' below). All 20 tests on 15-minute and 1-hour charts lost money. We measure trades in R. 1R is 1% of the account at the time of the trade, the most a trade is sized to lose at its stop-loss. Before trading costs, the average trade was close to zero on every chart: −0.006R on 15-minute charts, −0.026R on 1-hour charts and +0.025R on 4-hour charts. After trading costs, the average trade lost 0.090R on 15-minute charts and 0.067R on 1-hour charts, and made only +0.005R on 4-hour charts. Overnight fees are not included, and half of the 4-hour trades stayed open for 27.5 hours or more.
We ran the same 30 tests in two more versions, with the same exit, stop-loss and risk. 'Bands only' drops the RSI condition: a close outside the band, then a close back inside. These are the rules of our backtest of Bollinger Bands mean reversion (betting that price comes back to its average), here on this page's markets and years. 'RSI only' drops the bands from the entry: it buys when RSI crosses back above 30, and sells short when RSI crosses back below 70. We call the strategy on this page 'Bands + RSI'. Bands + RSI had a better result than Bands only in 24 of the 30 tests, mostly because it took fewer trades. On 1-hour and 4-hour charts, Bands only took 24,279 trades, and Bands + RSI took 9,280, about 2 for every 5. On those charts, the trades of Bands + RSI were not better: 48.4% of them won, compared with 51.1%, and the average trade lost 0.053R, compared with 0.048R. On 15-minute charts, the average trade lost more with RSI: 0.090R, compared with 0.077R. So the loss per trade stayed about the same or grew, but there were fewer trades, so the total loss was smaller (see the first table below).
Why did a smaller share of the trades win with RSI? RSI below 30 picked the signals where price had moved furthest from the middle band, the target. We sorted the 24,279 trades of Bands only on 1-hour and 4-hour charts by the RSI of the candle that closed outside the band (see the chart below). With RSI below 20, the target was 2.3 times as far away as the stop-loss in a typical trade (the median), measured at the signal, before the trade opened. 45.3% of those trades won. With RSI of 40 or more, the target was 0.65 times as far away as the stop-loss, and 56.0% won. The middle band moves toward the price while a trade is open. So when the target was far, the winners made much less than that first distance: 0.95R on average with RSI below 20. With RSI of 40 or more, they made 0.68R. A lower RSI meant a smaller share of winners, but bigger ones. So the average trade was a loss of 0.04R to 0.06R in every group, except below 20, where it lost 0.084R. We also ran the strategy itself with RSI levels of 20 and 80, and it did not help. On 1-hour and 4-hour charts, 45.3% of its trades won and the average trade lost 0.082R, compared with 48.4% and 0.053R with levels of 30 and 70.
Whether RSI helped depended on the market (see the second table below). On 1-hour and 4-hour charts, it helped most on GBP/USD, EUR/USD and EUR/GBP. On GBP/USD and EUR/USD, it turned a small loss per trade into a small gain. It hurt most on the Nasdaq 100 and the S&P 500. To see why, we split the Bands-only trades on these two indices by RSI. When RSI was between 30 and 70 on the candle that closed outside the band, those trades made money. They made +0.040R per trade on the Nasdaq 100 and +0.036R on the S&P 500. When RSI was below 30 (for a buy) or above 70 (for a sell), they lost 0.079R per trade on the Nasdaq 100 and 0.068R on the S&P 500. About 52% of them hit the stop-loss, compared with 44% of the others. So on these two indices, after the moves that pushed RSI below 30 or above 70, price more often kept going until it reached the stop-loss.
Adding the bands to RSI did not make the trades better either. On 1-hour and 4-hour charts, RSI only took 11,970 trades, and the average trade lost 0.055R, compared with 9,280 trades and 0.053R with Bands + RSI. Bands + RSI had a better result than RSI only in 21 of the 30 tests. On 4-hour charts, RSI only made money in 7 of the 10 tests, the most of the three versions, compared with 5 with Bands + RSI. But added up over the 10 markets, its 4-hour trades lost 4R, while those of Bands + RSI made 9R (see the first table). So on 4-hour charts, all three versions were close to break-even per trade, and small differences decided which tests ended above zero.
Bands only, RSI only, or Bands + RSI
RSI cut the number of trades, not the loss per trade
Each row adds up the 10 markets on one chart, from 2020 to 2025, after trading costs. 'Bands only' uses the same rules without RSI: a close outside the band, then a close back inside. 'RSI only' ignores the bands for the entry: it buys when RSI crosses back above 30, and sells short when RSI crosses back below 70. 'Bands + RSI' is the strategy on this page. All three exit at the middle band, with the same stop-loss and the same 1% risk. Results are in R: 1R is 1% of the account at the time of the trade.
| Chart | Version | Trades | Won | Average trade | All trades together |
|---|---|---|---|---|---|
| 15-minute | Bands only | 53,567 | 49.5% | −0.077R | −4,112R |
| 15-minute | RSI only | 32,485 | 48.9% | −0.081R | −2,625R |
| 15-minute | Bands + RSI | 25,280 | 45.3% | −0.090R | −2,283R |
| 1-hour | Bands only | 19,404 | 51.2% | −0.059R | −1,154R |
| 1-hour | RSI only | 9,528 | 50.9% | −0.069R | −656R |
| 1-hour | Bands + RSI | 7,436 | 48.7% | −0.067R | −498R |
| 4-hour | Bands only | 4,875 | 50.4% | −0.0005R | −2R |
| 4-hour | RSI only | 2,442 | 51.5% | −0.002R | −4R |
| 4-hour | Bands + RSI | 1,844 | 46.8% | +0.005R | +9R |
'Won' is the share of trades that made money. 'All trades together' adds up the R of every trade on the 10 markets. Each market had its own test account, so this is not one account's result. On 4-hour charts, 4 of 10 tests made money from 2020 to 2025 with Bands only. 7 of 10 did with RSI only, and 5 of 10 with Bands + RSI. On 15-minute and 1-hour charts, none of the 60 tests made money with any of the three versions.
How low was RSI?
The lower the RSI, the further away the target, and the smaller the share of winning trades
These are the 24,279 trades of Bands only (the same rules without RSI) on 1-hour and 4-hour charts, from 2020 to 2025. We grouped them by the RSI of the candle that closed outside the band. For a sell, we use 100 minus RSI: RSI 85 counts as 15, in the group 'below 20'. Each bar shows the share of trades that won. The strategy on this page takes only the three groups below 30, in amber.
- RSI below 201,433 trades. Target 2.3 times as far as the stop-loss. Average trade −0.084R. 45.3%
- RSI 20 to 252,581 trades. Target 1.8 times as far as the stop-loss. Average trade −0.059R. 47.3%
- RSI 25 to 304,888 trades. Target 1.4 times as far as the stop-loss. Average trade −0.038R. 49.8%
- RSI 30 to 356,533 trades. Target 1.1 times as far as the stop-loss. Average trade −0.045R. 50.7%
- RSI 35 to 405,693 trades. Target 0.86 times as far as the stop-loss. Average trade −0.049R. 52.9%
- RSI 40 or more3,151 trades. Target 0.65 times as far as the stop-loss. Average trade −0.040R. 56.0%
Each note compares two distances at the signal, before the trade opens: from the price to the target (the middle band), and from the price to the stop-loss. It shows a typical trade (the median). The average trade is after trading costs, in R (1R is 1% of the account).
Market by market
RSI helped most on GBP/USD, EUR/USD and EUR/GBP, and hurt most on the US stock indices
The average trade of each version on 1-hour and 4-hour charts together, from 2020 to 2025, after trading costs, in R (1R is 1% of the account). 'Bands + RSI' is the strategy on this page.
| Market | Bands only | RSI only | Bands + RSI |
|---|---|---|---|
| EUR/USD | −0.018R | −0.002R | +0.021R |
| GBP/USD | −0.029R | −0.015R | +0.013R |
| USD/JPY | −0.083R | −0.082R | −0.120R |
| AUD/USD | −0.017R | −0.058R | −0.011R |
| EUR/GBP | −0.093R | −0.094R | −0.054R |
| Gold | −0.052R | −0.054R | −0.050R |
| Silver | −0.134R | −0.146R | −0.164R |
| Nasdaq 100 | −0.007R | −0.047R | −0.072R |
| S&P 500 | −0.004R | −0.035R | −0.062R |
| DAX | −0.059R | −0.032R | −0.030R |
This table leaves out 15-minute charts: there, the trading costs took about 0.08R per trade with every version, and the average trade lost money on every market. Each market has 824 to 1,031 trades with Bands + RSI, 1,073 to 1,278 with RSI only and 1,919 to 2,619 with Bands only.
The strategy
What the RSI + Bollinger Bands 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 14 candles. Bollinger Bands are an indicator with three lines around the price. The middle band is the average closing price of the last 20 candles. The upper and lower bands are 2 standard deviations above and below it. A standard deviation measures how far the last 20 closing prices are spread out around their average. So the bands move apart when price moves a lot, and come closer together when price is quiet. Traders use both indicators to spot a market that has moved a long way in a short time. The signs are a close below the lower band, or RSI below 30, which traders call oversold. A common way to use them together is to trade only when both agree, so that each one filters out some of the other's false signals. The trade aims for the middle band because of an idea called mean reversion: after a big move, price tends to come back to its average.
- Bollinger Bands
- 20 candles, 2 standard deviations, on closing prices (the standard settings)
- RSI
- 14 candles, Wilder's formula, levels 30 and 70 (the standard settings)
- Stop-loss
- 1.5 × ATR(14) from the close of the signal candle (the candle that closes back inside the bands). ATR is how far price moves in an average candle, over the last 14 candles.
- Take-profit
- The middle band. When a candle closes at or beyond the middle band, the trade closes at the next candle's open.
- Risk per trade
- 1% of the account at the time of the trade. The account started at $10,000. The trade size is rounded down to a size the market allows, so a trade can risk a little less than 1%. On 4-hour charts, a typical trade (the median) risked 0.87% of the account on silver, 0.92% on gold and 0.93% on the Nasdaq 100.
- Smallest trade size
- 1,000 units of a currency pair, 1 ounce of gold, 50 ounces of silver or 0.1 of an index contract. When a 1% risk needed a smaller trade, the test skipped the signal. With the standard rules, this skipped 5 silver signals on 4-hour charts, and 19 silver and 2 gold signals on 1-hour charts. All of them came from October to December 2025. Then, the stop-loss (1.5 ATR) was so far from the price that even the smallest trade risked more than 1% of the account. On 15-minute charts, it skipped 869 silver and 212 gold signals, all after those accounts had lost more than 80%, and 4 signals on the other markets.
- Trading costs
- The spread, which is the gap between the buy price and the sell price. On currency pairs, it is in pips: a pip is 0.0001 on EUR/USD, GBP/USD, AUD/USD and EUR/GBP, and 0.01 on USD/JPY. The spread is 0.8 pips on EUR/USD, 1.2 on GBP/USD, 0.9 on USD/JPY, 1.0 on AUD/USD and 1.2 on EUR/GBP. It is $0.30 an ounce on gold and $0.020 on silver, and 1.5 points on the Nasdaq 100, 0.4 on the S&P 500 and 1.0 on the DAX. For silver, the Nasdaq 100 and the DAX, these are wider than our backtest engine's own spreads, to match a typical retail broker. Every order in this test is a market order or a stop-loss, so each trade pays half the spread when it opens and half when it closes. There is no commission.
- Overnight fees
- Not included. Brokers charge a fee (a swap), or sometimes pay one, for each night a trade stays open. With the standard rules, half of the trades closed within 75 minutes on 15-minute charts, 8 hours on 1-hour charts and 27.5 hours on 4-hour charts.
- Price data
- CFD prices: the prices a broker quotes for a CFD (contract for difference), the product most brokers outside the US offer for trading these markets. Flat candles were rare: at most about 0.5% of the candles in any test. From 2020 to 2025, our S&P 500 and DAX data had a few minutes of prices after the weekly close on 9 and 14 Fridays. The rules leave these candles out (see rule 8).
The rules we tested
- Buy when a candle closes below the lower band with RSI below 30, and the next candle closes back inside the bands, at or above the lower band. We call this second candle the signal candle. The trade opens at the open of the candle after the signal candle.
- Sell short (sell first, to profit if price falls) on the opposite signal. A candle closes above the upper band with RSI above 70, and the next candle (the signal candle) closes at or below the upper band. The trade opens at the open of the candle after the signal candle.
- Skip the signal if the signal candle already closed at or beyond the middle band, because price is already at the target.
- Close a buy when a candle closes at or above the middle band, and a sell when a candle closes at or below it. The trade closes at the next candle's open. The middle band changes with every new candle, so the target moves while the trade is open.
- ATR is an indicator of how far price moves in an average candle, measured over the last 14 candles. Put the stop-loss 1.5 times the signal candle's ATR below the signal candle's close 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).
- Only one trade is open at a time: a signal that comes while a trade is open is ignored. After a stop-loss, wait for the next signal.
- Size every trade so that, if the stop-loss is hit, the trade loses 1% of the account.
- Leave out flat candles, where the high equals the low (price did not move, for example on a holiday). Also leave out candles that open on a Friday at 17:00 New York time or later, after the weekly close. They do not count in the bands, the RSI or the ATR, and they are never a signal. The candle after one of them counts as the next candle.
The method
How we tested it
The test
- Markets
- EUR/USD, GBP/USD, USD/JPY, AUD/USD, EUR/GBP, Gold, Silver, Nasdaq 100, S&P 500 and DAX
- Charts
- 15-minute, 1-hour and 4-hour candles
- Dates
- January 2020 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 2020 to 2023 and again from 2024 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 2024 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 + Bollinger Bands strategy be improved?
We tried four changes that traders often make to this strategy, one at a time, on the same 30 tests. Two change when the trade opens: also waiting for RSI to cross back over 30 or 70, and entering as soon as a candle closes outside the band. One uses stricter RSI levels, 20 and 80. One changes the exit: take profit at the opposite band. The table below explains each one. If you pick the best change and judge it on the same years, it will almost always look good. So we picked the best one using 2020–2023 only, by the number of tests that made money, and then checked it on 2024–2025.
| Version | Made money 2020–2023years used to pick the best version | Made money 2024–2025years not used to pick it | Made money in both periods | Passed all four checks |
|---|---|---|---|---|
| Standard rules The rules under 'The rules we tested', with nothing changed. | 6 of 30middle test −30.9% | 11 of 30middle test −9.6% | 4 | 2 |
| Also wait for RSI to cross back over 30 or 70Best on 2020–2023 Buy only if RSI is back at 30 or higher when the signal candle closes back inside the bands. Sell short only if RSI is back at 70 or lower. Everything else is the same as in the standard rules. | 9 of 30middle test −14.3% | 11 of 30middle test −3.5% | 2 | 0 |
| RSI levels 20 and 80 Buy only if RSI was below 20, instead of 30, when the candle closed below the lower band. Sell short only if RSI was above 80, instead of 70. Everything else is the same as in the standard rules. | 3 of 30middle test −9.9% | 10 of 30middle test −1.2% | 1 | 1 |
| Enter on the close outside the band Don't wait for a candle to close back inside the bands. Buy at the next candle's open after the first candle that closes below the lower band with RSI below 30. Sell short after the first close above the upper band with RSI above 70. The stop-loss is 1.5 ATR from that candle's close, and the exit is the same. | 8 of 30middle test −23.7% | 12 of 30middle test −8.3% | 6 | 3 |
| Take profit at the opposite band Close a buy when a candle closes at or above the upper band, instead of at the middle band. Close a sell when a candle closes at or below the lower band. The entries and the stop-loss are the same as in the standard rules. | 7 of 30middle test −34.8% | 13 of 30middle test −5.3% | 5 | 2 |
None of the changes made the strategy profitable in most tests. In 2020–2023, the years we used to pick the best change, the change 'Also wait for RSI to cross back over 30 or 70' did best. 9 of 30 tests made money with it, compared with 6 with the standard rules. In 2024–2025, the years we kept for the check, it made money in 11 of 30, the same as the standard rules. Only 2 tests made money in both periods with it, compared with 4. One reason: on 4-hour charts it took about half as many trades, so every test there had fewer than 100 trades. A test with fewer than 100 trades does not count as making money in both periods. On 1-hour charts, its average trade was better, −0.041R instead of −0.067R, but still a loss. Entering on the close outside the band did a little better than the standard rules in every column of the table. But it still lost money in 21 of 30 tests. In 2020–2023, it made money in 8 tests, one fewer than the change we picked. On 1-hour and 4-hour charts, its trades won less often (42.5%, compared with 48.4%), but its winners were bigger (1.22R on average, compared with 0.91R). Taking profit at the opposite band made money in both periods in 5 tests, compared with 4. On 1-hour and 4-hour charts, it won about 1 trade in 3 (33.2%), and its winners were about twice as big (1.88R, compared with 0.91R). RSI levels of 20 and 80 cut the trades by 84%, and the average trade got worse on 15-minute and 4-hour charts.
Questions
Questions traders ask
Does the RSI and Bollinger Bands strategy work?
Mostly no. In our backtest from 2020 to 2025, with trading costs, it lost money in 25 of 30 tests: 10 markets, each on 15-minute, 1-hour and 4-hour charts. The strategy buys when a candle closes below the lower Bollinger Band with RSI below 30 and the next candle closes back inside the bands. It sells short (sells first, to profit if price falls) when the opposite happens at the upper band, with RSI above 70, and it takes profit at the middle band. All 5 tests that made money were on 4-hour charts. EUR/GBP did best on the 4-hour chart: the backtest account grew 35.3%. EUR/GBP and EUR/USD on 4-hour charts also passed all four of our checks, which include at least 100 trades and a profit in both 2020–2023 and 2024–2025.
Is RSI with Bollinger Bands better than Bollinger Bands alone?
It lost less, but its trades were not better. With the same exit and stop-loss, the bands with RSI had a better result than the bands alone in 24 of our 30 tests. That was mostly because RSI skipped most of the band signals: on 1-hour and 4-hour charts, the bands with RSI took 9,280 trades instead of 24,279. The trades they kept won less often (48.4%, compared with 51.1%). The average trade lost a little either way: 0.053% of the account with RSI and 0.048% without. RSI helped most on GBP/USD, EUR/USD and EUR/GBP, and hurt most on the Nasdaq 100 and the S&P 500.
What is the best timeframe for RSI and Bollinger Bands?
In our test, the 4-hour chart: 5 of the 10 tests made money there, and none on 15-minute or 1-hour charts. But even on 4-hour charts, the average trade made only 0.005% of the account after costs, and overnight fees are not included. On 15-minute charts, the accounts lost 73.7% to 98.1%, and 6 of the 10 were down 90% at some point. Six years of daily candles give too few trades, so we ran daily charts separately, from 2014 to 2025. Even then, the strategy took only 46 to 66 trades per market, too few to judge a test. Added together, those daily trades lost 0.015% of the account per trade on average, while the bands alone made 0.015%.
Should you use RSI 20 and 80 with Bollinger Bands?
Not in our test. With RSI below 20 for a buy and above 80 for a sell, instead of 30 and 70, the strategy took 5,498 trades instead of 34,560 on our 30 tests. A smaller share of them won: 45.3% on 1-hour and 4-hour charts, compared with 48.4%. A lower RSI means price has moved further from the middle band, the target, so the trade has further to go. The average trade was worse on 15-minute and 4-hour charts, and about the same on 1-hour charts. In the table of changes, its median test (the middle one of the 30) lost less, mostly because it took 84% fewer trades, not because its trades were better. All 10 tests on 4-hour charts had fewer than 100 trades with 20 and 80, too few to judge.
Keep exploring
Related strategies we tested
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% Grid Grid trading strategy backtest on forex, gold and silver Made money in 5 of 10 tests, 3 of them in both periods. Best: EUR/GBP, 15-minute, +11% Bollinger Bands Bollinger Bands mean reversion strategy backtest Made money in 9 of 36 tests, 3 of them in both periods. Best: S&P 500, 4-hour, +46%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 RsiBollingerBands(Strategy):
"""RSI + Bollinger Bands, as most traders learn it, plus four changes traders make and
the two controls (each indicator alone, with the same exit and stop-loss).
The indicators, on the chart's closing prices:
Bollinger Bands (20, 2): the middle band is the average close of the last 20 candles;
the upper and lower bands are 2 standard deviations above and below it.
RSI (14), Wilder's formula: 100 - 100 / (1 + average up move / average down move).
ATR (14), Wilder's average of the true range.
Standard (all switches off): buy when a candle closed below the lower band with RSI
below 30, and the next candle closes back inside the bands (at or above the lower band).
Sell short on the mirror: a candle closed above the upper band with RSI above 70, and the
next candle closes at or below the upper band. Skip a signal whose candle already closed
at or beyond the middle band. The trade opens at the next candle's open. Close a buy when
a candle closes at or above the middle band, and a sell when a candle closes at or below
it; the exit fills at the next candle's open. The stop-loss is 1.5 x ATR(14) from the
signal candle's close and does not move. Size so that the stop costs 1% of the account.
One trade at a time: a signal while a trade is open is ignored.
Skipped candles: a flat candle (high = low: no price change, as on a holiday) and a candle
that opens on a Friday at 17:00 New York time or later (a few minutes of index or silver
prices after the weekly close make a tiny extra candle). The strategy leaves them out
completely: they are not in the bands, the RSI or the ATR, they are never a signal candle,
and the candle after one counts as the next candle. That is why the indicators are worked
out here instead of with the built-in ones. On a market that trades at the weekend, remove
the Friday rule.
The controls (the same exit, stop-loss and sizing, to see what each indicator adds):
use_rsi = 0 bands only: the RSI condition is dropped (the Bollinger Band bounce)
use_bands = 0 RSI only: buy when RSI crosses back above 30 (it was below 30 on the
candle before), sell short when it crosses back below 70
The changes, one at a time:
rsi_back = 1 the candle that closes back inside the bands must also have RSI back
at 30 or higher (a buy) or at 70 or lower (a sell)
oversold = 20, overbought = 80 stricter RSI levels: below 20 and above 80
early = 1 don't wait for the close back inside: buy at the next open after the
first candle that closes below the lower band with RSI below 30 (sell
short on the mirror); the stop-loss is 1.5 x ATR from that candle's close
exit_band = 1 take profit at the opposite band: close a buy when a candle closes at or
above the upper band, a sell when a candle closes at or below the lower band
"""
params = {"bb_period": Param(type=int, default=20, min=5, max=200),
"bb_std": Param(type=float, default=2.0, min=0.5, max=5.0),
"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_period": Param(type=int, default=14, min=2, max=100),
"atr_mult": Param(type=float, default=1.5, min=0.5, max=10.0),
"use_rsi": Param(type=int, default=1, min=0, max=1),
"use_bands": Param(type=int, default=1, min=0, max=1),
"rsi_back": Param(type=int, default=0, min=0, max=1),
"early": Param(type=int, default=0, min=0, max=1),
"exit_band": Param(type=int, default=0, min=0, max=1)}
lookback = 2
warmup_candles = 100 # candles used before the first trade, so RSI and ATR have settled
def init(self, ctx):
self.ny = ctx.clock("America/New_York")
self.closes = [] # closes of the candles used, newest last (the last 20)
self.prev_close = None # the close of the last candle used
self.moves = [] # the first price changes, to start RSI's averages
self.avg_up = None # Wilder's average up move and down move (RSI)
self.avg_down = None
self.trs = [] # the first true ranges, to start the ATR
self.atr = None
self.used = 0 # candles used so far
self.last = None # the last candle used: (close, lower, middle, upper, RSI)
def on_bar(self, ctx):
# Candles the strategy leaves out (see above).
if ctx.high[0] == ctx.low[0] or (self.ny.weekday == 4 and self.ny.hour >= 17):
return
p = ctx.params
high, low, close = ctx.high[0], ctx.low[0], ctx.close[0]
prev_close, self.prev_close = self.prev_close, close
self.used += 1
# ATR: Wilder's average of the true range.
if prev_close is None:
true_range = high - low
else:
true_range = max(high - low, abs(high - prev_close), abs(low - prev_close))
if self.atr is None:
self.trs.append(true_range)
if len(self.trs) == p.atr_period:
self.atr = sum(self.trs) / p.atr_period
else:
self.atr += (true_range - self.atr) / p.atr_period
# RSI: Wilder's averages of the up moves and the down moves.
rsi = None
if prev_close is not None:
move = close - prev_close
up, down = max(move, 0.0), max(-move, 0.0)
if self.avg_up is None:
self.moves.append((up, down))
if len(self.moves) == p.rsi_period:
self.avg_up = sum(m[0] for m in self.moves) / p.rsi_period
self.avg_down = sum(m[1] for m in self.moves) / p.rsi_period
else:
self.avg_up += (up - self.avg_up) / p.rsi_period
self.avg_down += (down - self.avg_down) / p.rsi_period
if self.avg_up is not None:
rsi = 100.0 if self.avg_down == 0 else 100.0 - 100.0 / (1.0 + self.avg_up / self.avg_down)
# Bollinger Bands: the average of the last 20 closes, plus and minus 2 standard deviations.
self.closes.append(close)
del self.closes[:-p.bb_period]
mid = lower = upper = None
if len(self.closes) == p.bb_period:
mid = sum(self.closes) / p.bb_period
sd = (sum((c - mid) ** 2 for c in self.closes) / p.bb_period) ** 0.5
upper, lower = mid + p.bb_std * sd, mid - p.bb_std * sd
last, self.last = self.last, (close, lower, mid, upper, rsi)
if (last is None or last[1] is None or last[4] is None or mid is None or rsi is None
or self.atr is None or self.used < self.warmup_candles):
return
c1, lower1, _, upper1, rsi1 = last
pos = ctx.position
if pos is not None:
# The exit: a close at or beyond the target. It fills at the next candle's open.
if pos.is_long and close >= (upper if p.exit_band == 1 else mid):
ctx.close_position()
elif pos.is_short and close <= (lower if p.exit_band == 1 else mid):
ctx.close_position()
return
low_level, high_level = p.oversold, p.overbought
if p.early == 1:
# The first candle that closes outside the band with RSI beyond the level.
buy = close < lower and rsi < low_level and not (c1 < lower1 and rsi1 < low_level)
sell = close > upper and rsi > high_level and not (c1 > upper1 and rsi1 > high_level)
elif p.use_bands == 0:
buy = rsi1 < low_level and rsi >= low_level # RSI crosses back above 30
sell = rsi1 > high_level and rsi <= high_level # RSI crosses back below 70
else:
# The candle before closed outside the band (with RSI beyond the level), and
# this candle closes back inside the bands.
buy = c1 < lower1 and close >= lower and (p.use_rsi == 0 or rsi1 < low_level)
sell = c1 > upper1 and close <= upper and (p.use_rsi == 0 or rsi1 > high_level)
if p.rsi_back == 1:
buy = buy and rsi >= low_level
sell = sell and rsi <= high_level
# A signal candle that already closed at or beyond the target leaves nothing to take.
target_long = upper if p.exit_band == 1 else mid
target_short = lower if p.exit_band == 1 else mid
dist = p.atr_mult * self.atr
if ctx.gate("buy_signal", buy) and ctx.gate("target_above", close < target_long):
stop = close - dist
ctx.buy(size=ctx.size_by_risk_pct(0.01, stop=stop, entry=close), sl=stop, tag="rsi_bb_long")
elif ctx.gate("sell_signal", sell) and ctx.gate("target_below", close > target_short):
stop = close + dist
ctx.sell(size=ctx.size_by_risk_pct(0.01, stop=stop, entry=close), sl=stop, tag="rsi_bb_short")
Your turn
Test the RSI + Bollinger Bands strategy yourself
Change the settings, the market or the stop-loss and see the result in seconds. Ask the BacktestingMax AI: Backtest RSI + Bollinger Bands on EUR/GBP, 4-hour chart: buy after a close below the lower band with RSI under 30 and a close back inside, exit at the middle band, stop-loss 1.5 ATR
.
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 2 November 2026.