Bollinger Bands and RSI: give each indicator one job
Bollinger Bands describe price location and dispersion. RSI measures recent momentum on a 0 to 100 scale. A useful combination assigns a separate condition to each indicator instead of treating two extreme readings as proof of a reversal.
Direct answer
For a basic test, use 20-period Bollinger Bands at two deviations and RSI 14. Require a closed-bar event at the band plus a separate RSI condition, then define the exit and invalidation before running the backtest.
Starting values
Bollinger length
20 bars
Deviation
2.0
RSI length
14 bars
RSI references
30 and 70
How I test the setup
- 1
When I test SPY mean reversion, I require the band event and RSI condition on closed bars. I do not count an intrabar touch.
- 2
I compare RSI below 30 with an RSI cross back above 30. Those are different triggers and can produce different trade timing.
- 3
I turn the trend filter on and off in separate runs. Price can walk the lower band while RSI stays weak during a downtrend.
Two common Bollinger and RSI setups
The first setup puts Bollinger Bands on price and uses RSI as a momentum filter. The second calculates Bollinger Bands on the RSI series itself. They answer different questions and should not share one vague signal definition.
- Price bands plus RSI: test price location and momentum as separate conditions.
- Bands on RSI: measure where the RSI series sits relative to its own recent dispersion.
- Write the source series into the strategy name so the results stay distinguishable.
A conservative mean-reversion test
One test can require price to close below the lower band, then close back inside while RSI crosses above 30. A short test can mirror the logic at the upper band and RSI 70. This avoids treating the first extreme reading as an immediate entry, but it does not remove market risk.
Why confirmation can still fail
Bollinger Bands and RSI both use the same price history, so two signals do not create independent evidence. Strong trends can hold price near an outer band and keep RSI extreme. Test a trend filter, fees, slippage, and a maximum holding period rather than relying on indicator agreement alone.
Price bands plus RSI vs Bollinger Bands on RSI
| Question | Price bands plus RSI | Bands on RSI |
|---|---|---|
| Band source | Price, usually close | RSI values |
| What it measures | Price location plus momentum | RSI location within its own dispersion |
| Typical chart | Price pane plus RSI pane | One oscillator pane |
| Main risk | Duplicate evidence from the same price history | Extra parameters and easy overfitting |
Bollinger Bands and RSI Pine Script prompt
This prompt waits for re-entry instead of buying or selling the first band touch.
Create a Pine Script v6 strategy with Bollinger Bands length 20, multiplier 2, and RSI length 14. Long setup: price previously closed below the lower band, then closes back inside while RSI crosses above 30. Short setup: price previously closed above the upper band, then closes back inside while RSI crosses below 70. Add optional 200 EMA trend filter, date range, fees, slippage, stop, and maximum holding bars. Plot each condition separately and use bar-close alerts.Build the RSI rule
Related Bollinger Bands pages
Tools for the next test
RSI Calculator
Calculate the Relative Strength Index to identify overbought or oversold conditions.
Bollinger Bands Calculator
Compute Bollinger Bands to analyze market volatility and potential price breakouts.
Bollinger Bands Percent B
Calculate Bollinger %B, interpret the 0, 0.5, and 1 reference values, and generate exact threshold alerts.
Bollinger Bands Crossover
Define upper, lower, and basis crossover events by direction and generate separate bar-close alerts for each event.
Sources and method notes
Pineify is an information tool, not investment advice. Indicator agreement does not guarantee a reversal or return. Test assumptions and risk limits before any live use.