RSI and Bollinger Bands strategy: combined rules and how to test them
Traders take a Bollinger Band touch as the first condition and an RSI extreme on the same bar as the second, and act only when both agree. The second condition removes most band touches, so the pair is a filter, not an edge, and only a backtest with costs and an out-of-sample split shows whether the trades it keeps are worth the trades it throws away.
By Soren Huang · Published · updated · Editorial policy
Contents
- How do traders combine RSI and Bollinger Bands?
- What does each indicator do in the pair?
- What parameters do most traders use for RSI and Bollinger Bands?
- What are example entry and exit rules when both signal?
- How do you read RSI and Bollinger divergence?
- What win rate does the combination give, and what does overfitting do to it?
- How do you backtest an RSI plus Bollinger strategy?
- Frequently asked questions
- References
How do traders combine RSI and Bollinger Bands?
An RSI Bollinger Bands strategy takes a close outside a Bollinger Band as the first condition and an RSI reading past 70 or 30 on the same bar as the second, and enters only when both agree. The second condition removes most band touches, so the pair must be tested on history with costs, not assumed to work.
The reason traders add RSI is that a Bollinger Band touch alone fires often. In a strong trend, price can close outside the band for several bars in a row, and a rule that fades every touch sells into a rising market again and again. Requiring RSI to be stretched at the same time keeps only the touches where recent closes have also moved fast in one direction. Think of two security guards at one door: a visitor gets in only when both nod. Fewer visitors get in, and the hope is that the ones who do are the right ones. Whether that hope holds is a question for a test. My view: the combination is a filter, and a filter is only worth having if the trades it keeps are better after costs than the trades it removes.
What does each indicator do in the pair?
Bollinger Bands measure how far price sits from its moving average, RSI measures how fast recent closes have moved in one direction, so the two describe different things and one can filter the other. If both indicators measured the same thing, requiring both would be like asking the same guard twice.
Bollinger Bands are a middle line, usually a 20-period simple moving average, with an upper and a lower band drawn a set number of standard deviations above and below it. A standard deviation is a measure of how widely recent closes are spread around their average; wide swings give a large value, quiet bars give a small one. Because the bands use this spread, they widen in volatile markets and narrow in quiet ones. A close below the lower band therefore says one thing: price is unusually far from its recent average, measured against recent volatility. The band rules on their own, and what their tests show, are covered in how a Bollinger Bands strategy works and how to backtest it.
RSI (Relative Strength Index) is an oscillator between 0 and 100 that compares the size of up closes with the size of down closes over a lookback, usually 14 bars. A reading above 70 means up closes have dominated recently; below 30 means down closes have. RSI knows nothing about distance from an average; it only knows direction and speed. The levels, the formula and how to test RSI rules alone are in RSI indicator: formula, 70/30 levels and how to test RSI rules.
Put together, the combined signal reads: price is stretched away from its mean, and the move that stretched it was fast and one-sided. That is a mean-reversion reading. Both tools belong to the family of rule-based studies described in which technical analysis tools and indicators you can actually test, and both can be written as exact conditions, which is what makes a test possible.
What parameters do most traders use for RSI and Bollinger Bands?
The common defaults are a 20-period average with bands at two standard deviations and a 14-period RSI with 70 and 30 levels, and tightening either setting raises the signal count while lowering the quality of each signal. These defaults are a starting point for a test, not a recommendation; they are useful mainly because they have not been tuned to your data.
Three knobs matter on the band side: the lookback of the moving average, the number of standard deviations, and the type of average used for the middle line. Replacing the simple average with a faster one moves the whole channel; what changes when Bollinger Bands get a Hull midline walks through one such variant and its test. On the RSI side, the knobs are the lookback and the two levels. Every knob pulls in the same direction: shorter lookbacks and narrower bands mean more bars qualify, longer lookbacks and wider bands mean fewer.
| Setting | Tight | Default | Loose |
|---|---|---|---|
| Band lookback and width | 10 periods, 1.5 standard deviations | 20 periods, 2 standard deviations | 50 periods, 2.5 standard deviations |
| RSI lookback and levels | 7 periods, 80 and 20 | 14 periods, 70 and 30 | 21 periods, 75 and 25 |
| Signals per year | Many | Moderate | Few |
| Typical signal | Small pullback inside a trend | Noticeable stretch | Rare, large stretch |
| Trade-off | Costs weigh heavily; many signals are noise | Middle ground, untuned | Few trades, long waits, small out-of-sample sample |
The practical consequence: do not pick the setting that gave the best backtest. Pick a setting, then check that the neighbouring settings (18 and 22 periods, 1.8 and 2.2 standard deviations, RSI 12 and 16) behave in a similar way. A setting that only works at one exact value has described noise in that history.
What are example entry and exit rules when both signal?
A testable rule set states the band condition, the RSI condition, the bar on which the order goes in, and exactly one exit, written down before any test runs. A rule that lives in your head changes a little every time you look at a chart; a rule on paper cannot.
Here is one long-side rule set in the order the checks happen. The short side mirrors it with the upper band and RSI above 70.
- Band condition. The bar closes below the lower Bollinger Band (20 periods, 2 standard deviations). Use the close, not the low, so that a wick that dips through the band does not count.
- RSI condition. On the same bar, the 14-period RSI is below 30. Both conditions on the same bar; a touch today with RSI below 30 three bars ago does not qualify.
- Entry bar. Buy at the open of the next bar. Next-bar execution is the practice of placing the order on the bar after the one that produced the signal, because the signal is only known when that bar has closed. Filling on the signal bar's own close uses a price you could not have traded at.
- Exit. Choose one and keep it for the whole test: close crosses back above the middle band; close reaches the upper band; or RSI crosses above 50. The middle-band exit gives the most trades and the smallest winners; the opposite-band exit gives the fewest trades and the largest swings in either direction.
- Flat afterwards. Stay out until the next bar on which both conditions are met again. No re-entry on the same signal.
Two choices are left open in this list on purpose: whether to add a stop, and whether to trade the short side at all in an index future that spent most of recent years rising. Both are settings to test, not to assume. When you write this rule set into AlphaPrime (Valynox) as a candidate, its backtesting charges commission and slippage and fills on the next bar inside every evaluation, so the version of the rule you compare against other candidates is already the version you could have traded.
How do you read RSI and Bollinger divergence?
Bullish divergence is price making a new low below the lower band while RSI makes a higher low, and it becomes a rule you can test only once you define how many bars apart the two lows may be. Without that number, two traders looking at the same chart will mark different divergences, and a backtest cannot be written.
The idea behind it is that price fell further but the fall was slower. The second low closed below the lower Bollinger Band and below the first low, so price is stretched. RSI at the second low is higher than RSI at the first low, so the down closes that produced the second low were smaller or fewer than before. Traders read this as a sign that selling is tiring. The bearish version is the mirror: a higher high above the upper band with a lower RSI high.
To turn the picture into a rule, write down four numbers before testing:
- Minimum and maximum bars between the two lows. For example at least 5 and at most 30 bars. Too few and the two lows are one move; too many and the comparison is meaningless.
- How a low is confirmed. A bar is a swing low when the two bars on each side have higher lows. This costs two bars of delay but stops the rule from using information that did not exist yet.
- How much higher the RSI low must be. Half a point of RSI is noise; a threshold such as three points makes the rule stricter and the sample smaller.
- Whether the second low must close outside the band, or only touch it. Closing outside is the stricter, more testable choice.
What win rate does the combination give, and what does overfitting do to it?
Win rate alone says little about this strategy, because the exit decides how large the winners and losers are, and a win rate found by tuning both indicators on one history drops when the rule meets new data. A mean-reversion rule with a middle-band exit can win often with small winners and lose rarely with large losers, and the average trade after costs can still be negative.
The useful number is expectancy, the average result per trade after commission and slippage. It combines win rate, average winner and average loser into one figure; the free win rate and expectancy calculator shows how a high win rate and a poor payoff ratio can cancel each other out. Overfitting is tuning a rule so closely to one stretch of history that it describes the noise in that stretch rather than a repeatable pattern. With two indicators there are five or six settings to tune, and Bailey, Borwein, López de Prado and Zhu (2014) show that the more variants you try on one data set, the more the best one's result is inflated by luck. Harvey and Liu (2015) come to the same view and suggest discounting any result by the number of tests that produced it.
Hypothetical example
A trader tunes band lookback, band width, RSI lookback and both RSI levels on eight years of data and keeps the combination with the highest win rate: 68 percent in-sample. On the following two years, unchanged, it wins 49 percent of its trades. A second trader keeps the default settings, which showed 55 percent in-sample, and sees 52 percent on the same two later years. The tuned rule lost 19 points of win rate; the default rule lost 3. The gap between in-sample and out-of-sample is the selection bonus that tuning bought, and it does not travel into the future.
To show what a complete report with costs looks like beyond the win rate, here is a run from AlphaPrime on ES (E-mini S&P 500) daily bars from 2019-01-02 to 2025-06-30, long and short, one contract, with $20 commission and $25 slippage charged on every trade. It did not test the RSI plus Bollinger rule above; it used a QQE rule, an indicator built from a smoothed RSI, as its only entry and exit, with no stop, target or filter, so it is a stand-in from the same indicator family rather than the subject itself. The candidate shown is the one the search kept out of 1,024 it tried, chosen for its return against its drawdown, and picking the kept one after the fact flatters it in exactly the way the hypothetical example describes.
Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $97,472.5 |
| Max drawdown | $50,980 |
| Trades | 137 |
| Win rate | 53.28% |
| Profit factor | 1.441 |
| Average trade | $711.48 |
| Time in market | 84.7% |
Read this report the way you would read your own. The win rate of 53.28% is close to a coin toss, and the result comes from the winners being larger than the losers, which the profit factor of 1.441 shows. The average trade of $711.48 is after costs, and it rests on 137 trades over six and a half years; a per-trade figure from a sample this size can move a long way if a handful of trades change. The max drawdown of $50,980 is the number to set against the net profit of $97,472.5 before anything else. None of this says that a QQE rule, or an RSI plus Bollinger rule, earns this on new data; it says what a report with costs looks like, and which lines to read first.
How do you backtest an RSI plus Bollinger strategy?
Set bar size, session, commission, slippage and next-bar execution first, split the history into an in-sample and an out-of-sample period by date, test the neighbouring settings, and read the average trade after costs instead of the win rate. The order matters: costs and the split come before any result is read, so the result cannot pull the settings toward it.
- Choose the market, bar size and session. Daily bars give few trades per year; a 30-minute bar on an index future gives many more, and the session you include (day only or the full 23-hour session) changes where the bands sit at the open. Write the choice down.
- Set commission, slippage and next-bar execution. Use your broker's round-trip cost and at least one tick of slippage per side for a liquid future. Signals are computed on the close and filled on the next bar's open.
- Write the entry and exit rules. The ordered list in the fourth section is a template: band condition, RSI condition, entry bar, one exit, flat afterwards. Add a stop only as a named variant.
- Split the history by date. Tune nothing on the later 20 to 30 percent of the data. The in-sample part chooses, the out-of-sample part judges, and the rules travel in one direction only.
- Test the neighbouring settings. Run band lookbacks of 18, 20 and 22, widths of 1.8, 2.0 and 2.2, RSI lookbacks of 12, 14 and 16. A flat region where all of them behave alike is a good sign; a single spike is not.
- Read the average trade after costs and the out-of-sample trade count. Compare the out-of-sample average trade with the in-sample one. Count the out-of-sample trades: fewer than about 30 is a hint, not a result, and a daily-bar version of this rule will often land there, which argues for a longer history or a smaller bar size.
The same six steps answer the claim this article started with. Run the band-only rule and the combined rule with identical costs and the identical split. If the combined rule's out-of-sample average trade after costs is higher, the RSI filter earned its place; if it only lowered the trade count and left the average trade where it was, the second guard at the door was not needed. Start with that pair of runs on one market and one bar size, and write the acceptance rule, in dollars per trade and in out-of-sample trades, before you open the first report.
Frequently asked questions
What parameters should I use for RSI and Bollinger Bands?
Start with the common defaults: a 20-period moving average with bands at two standard deviations, and a 14-period RSI with 70 and 30 levels. These are useful because they have not been tuned to your data. After the first test, check that neighbouring settings such as 18 and 22 periods or RSI 12 and 16 behave in a similar way; a setting that only works at one exact value has described noise.
What is the win rate when RSI and Bollinger Bands signal at the same time?
There is no fixed win rate; it depends on the market, the bar size, the exit and the costs, and a figure tuned on one history falls on new data. Win rate also says little on its own, because a middle-band exit produces many small winners and occasional large losers. Judge the rule by the average trade after commission and slippage on an out-of-sample period, not by the share of winning trades.
How do I read RSI and Bollinger Band divergence?
Bullish divergence is a second price low that closes below the lower band and below the first low, while RSI at the second low is higher than at the first. Bearish divergence is the mirror with highs above the upper band. To test it, fix the allowed bar distance between the two lows, confirm each low with the bars after it, and set a minimum RSI difference, so the rule gives the same answer on every bar.
Is the RSI and Bollinger Bands combination a trend or a mean-reversion strategy?
In its common form it is mean reversion: it buys after a fast fall that pushed price below the lower band and sells after a fast rise above the upper band, expecting price to return toward the middle line. Some traders use the same two indicators the other way, treating a close outside the band with strong RSI as a breakout to follow. Both versions are testable, but they are different strategies and should be judged separately.
References
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.

