Trading Indicator
Bollinger Bands Strategy: How to Use Them in Automated Trading
Learn how Bollinger Bands measure volatility and how to combine them with rule-based filters in Tradeworks.
Bollinger Bands Explained: How They Work
The Bollinger Bands indicator is a volatility tool built around a moving average. The middle band is usually a simple moving average, while the upper and lower bands are plotted a set number of standard deviations above and below it.
In automated trading, Bollinger Bands can help a bot separate range conditions, volatility expansion, and mean-reversion setups. They should usually be combined with a filter such as ADX, RSI, Moving Average, or ATR-based exits.
Bollinger Band Squeeze
A Bollinger Band squeeze occurs when the bands narrow significantly, indicating decreasing volatility. This compression often precedes a sharp expansion move. In automated strategies, identifying a squeeze can help time breakout entries � combine narrowing bands with ADX below 20 to detect consolidation, then trade the subsequent band expansion.
- Volatility Measurement: Wider bands reflect rising volatility, while narrower bands reflect decreasing volatility
- Price Location: Price can be compared with the upper band, lower band, or middle band
- Breakout Context: A band cross can be combined with ADX to filter for trend conditions
- Mean Reversion Context: Price outside a band can be combined with low ADX or RSI confirmation
- Risk Context: ATR can provide volatility-based Stop Loss Exit Signal and Take Profit Exit Signal rules
Bollinger Bands are indicating the current volatility of the given instrument. They are calculated as the 2 standard deviations below (lower band) and above (upper band) of the simple moving average for the selected period. Widening bands indicate rising volatility and the narrowing bands indicate the decreasing volatility. The are many trading signals based on the Bollinger bands - the most popular is expecting the price to reverse if it touches either of the bands.
Understanding Bollinger Bands Settings
- Standard settings: Period 20 with 2 standard deviations is the most common baseline for testing
- Shorter period (e.g. 10): Bands react faster to price changes, generating more frequent signals � useful for shorter timeframes
- Longer period (e.g. 50): Bands are smoother and slower, filtering out noise but potentially missing early entries
- Higher deviations (e.g. 2.5�3): Wider bands mean fewer touches � signals are rarer but potentially stronger
- Best settings for day trading: Many day traders test Period 10�15 with 1.5�2 standard deviations, but always backtest before going live
A Bollinger Bands trading strategy should define the band condition, the confirmation filter, and the exit rule before it is tested in automation.
Strategy 1: Bollinger Band Breakout Strategy with ADX Filter
Trend Confirmation
This strategy uses Bollinger Bands for breakout context and ADX as a trend-strength filter. It avoids broad breakout prediction claims and only acts when price crosses a band while ADX confirms trend strength.
Setup in Tradeworks:
- Add Bollinger Bands indicator to your strategy
- Set parameters: Period = 20, Standard Deviations = 2
- Add Average Directional Movement Index (ADX) with period 14
- Configure entry conditions:
- Open Position Buy Signal: Strategy symbol ASK price crosses from below to above Bollinger Bands upper band AND ADX value is greater than 25
- Open Position Sell Signal: Strategy symbol BID price crosses from above to below Bollinger Bands lower band AND ADX value is greater than 25
Trade Management
- Stop Loss Exit Signal:
- For longs: 'Strategy symbol BID price is less than Bollinger Bands middle band'
- For shorts: 'Strategy symbol ASK price is greater than Bollinger Bands middle band'
- Take Profit Exit Signal:
- Testing note: Compare chart intervals and instruments in backtesting before deciding where this setup fits your approach.
Strategy 2: Bollinger Bands Mean Reversion
Range Filter
This strategy uses Bollinger Bands for range context and ADX to avoid taking mean-reversion signals during stronger trends.
Setup in Tradeworks:
- Add Bollinger Bands indicator
- Add Average Directional Movement Index (ADX) with period 14
- Set Bollinger Bands parameters to Period = 20 and Standard Deviations = 2
- Configure entry conditions:
- Open Position Buy Signal: Strategy symbol ASK price is less than Bollinger Bands lower band AND ADX value is less than 25
- Open Position Sell Signal: Strategy symbol BID price is greater than Bollinger Bands upper band AND ADX value is less than 25
Trade Management
- Stop Loss Exit Signal:
- Take Profit Exit Signal:
- For longs: 'Strategy symbol BID price is greater than Bollinger Bands middle band'
- For shorts: 'Strategy symbol ASK price is less than Bollinger Bands middle band'
- Common Timeframe: 1-hour to 4-hour charts
- Common Pairs: EUR/USD, GBP/USD, AUD/USD
Strategy 3: Bollinger Bands RSI Confirmation
Momentum Confirmation
This strategy combines Bollinger Band extremes with RSI momentum confirmation. It avoids treating a band touch as enough by itself and waits for RSI to move back through a defined level.
Setup in Tradeworks:
- Add Bollinger Bands indicator
- Add Relative Strength Index (RSI) with period 14
- Add Average True Range (ATR) for exits
- Configure entry conditions:
- Open Position Buy Signal: Strategy symbol ASK price is less than Bollinger Bands lower band AND RSI value crosses from below to above 30
- Open Position Sell Signal: Strategy symbol BID price is greater than Bollinger Bands upper band AND RSI value crosses from above to below 70
Trade Management
- Stop Loss Exit Signal:
- Take Profit Exit Signal:
- For longs: 'Strategy symbol BID price is greater than Bollinger Bands middle band'
- For shorts: 'Strategy symbol ASK price is less than Bollinger Bands middle band'
- Typical Timeframe: 1-hour to 4-hour charts
- Suitable Pairs: EUR/USD, GBP/USD, EUR/GBP, AUD/USD
For Bot Developers: Implementation Tips + Manageable Beginner Setup
Choosing Bollinger Bands Settings
- Common baseline: Period 20 with standard deviation 2 is a practical starting setup for testing
- Period changes: Shorter periods react faster but can create more frequent signals
- Deviation changes: Lower deviations place bands closer to price, while higher deviations place bands farther away
- Operator clarity: Prefer direct band comparisons and crosses over calculated band-width logic
Combining with Other Indicators
- Trend or Range Context: Use Average Directional Movement Index (ADX) to distinguish trend and range conditions
- Momentum Confirmation: Use Relative Strength Index (RSI) for band-touch confirmation
- Volatility-Based Exits: Use Average True Range (ATR) for Stop Loss Exit Signal and Take Profit Exit Signal levels
- Middle Band Context: Use Moving Average to understand the basis of the middle band
Common Pitfalls to Avoid
- Band-width calculations: Avoid rules based on Upper Band minus Lower Band unless the editor exposes that value directly
- Volume assumptions: Avoid volume-comparison rules unless the required volume field is selectable
- Direction assumptions: A band touch does not define direction by itself
- Unclear exits: Use concrete exits based on ATR, previous bar close, or the Bollinger middle band
Manageable Beginner Setup
- Start with one mode: Test mean reversion and breakout setups separately
- Add one filter: Use ADX below 25 for range context or above 25 for trend context
- Use ATR exits: Keep Stop Loss Exit Signal rules consistent across tests
- Paper trade before live execution: Run the setup on a demo or paper account before live execution
Questions
Frequently Asked Questions
What do Bollinger Bands measure?
Bollinger Bands measure volatility around a moving average. The upper and lower bands expand when volatility rises and contract when volatility falls.
Can Bollinger Bands predict breakout direction?
No. Bollinger Bands show volatility conditions, not direction by themselves. Automated strategies should combine them with directional filters such as ADX, RSI, or Moving Average.
How can Bollinger Bands be used in automated trading?
In Tradeworks, Bollinger Bands can be used with rule-based conditions such as price crossing a band, price being greater than or less than a band, and exits based on the middle band or ATR-based levels.
What settings are commonly used for Bollinger Bands?
A 20-period moving average with 2 standard deviations is a common starting point. Traders should test settings against timeframe, market type, and strategy rules before using them live.
Which indicators combine well with Bollinger Bands?
Bollinger Bands can combine with Average Directional Movement Index for trend/range filtering, Relative Strength Index for momentum context, Moving Average for trend direction, and Average True Range for exit rules.
What are the best Bollinger Bands settings for day trading?
Many day traders test Period 10-15 with 1.5-2 standard deviations for faster signals. The standard 20/2 settings work well for swing trading. Always backtest different settings against your timeframe and pairs before going live.
What is a Bollinger Band squeeze?
A Bollinger Band squeeze occurs when the bands narrow significantly, indicating low volatility. This compression often precedes a sharp price expansion. Traders watch for squeezes as potential breakout setup signals.
Can Bollinger Bands be used alone in a trading strategy?
Bollinger Bands alone show volatility, not direction. For automated strategies, they should be combined with at least one directional filter (like ADX or RSI) and proper exit rules (like ATR-based stops) to create a complete trading system.
Try it in Tradeworks
Want to try Bollinger Bands in Tradeworks?
Build and test Bollinger Bands rules in a no-code strategy builder before deciding whether they fit your trading approach.
Trend Indicators
Trend indicators help traders identify the direction of market movement. They smooth price data to show whether an uptrend, downtrend, or sideways movement is occurring.
Simple Moving Average
Learn more →
Exponential Moving Average
Learn more →
Parabolic SAR
Learn more →
Heikin Ashi
Learn more →
High Low
Learn more →
Linear Regression
Learn more →
Two Pole Butterworth Filter
Learn more →
Ichimoku Kinko Hyo
Learn more →
Alligator
Learn more →
Envelopes
Learn more →
Doji Arrows
Learn more →
Oscillators
Oscillators are bounded indicators that move between set values. They help identify overbought and oversold conditions, momentum, and potential reversal points.
Relative Strength Index
Learn more →
Relative Momentum Index
Learn more →
Stochastic Oscillator
Learn more →
Moving Average Convergence/Divergence
Learn more →
Awesome Oscillator
Learn more →
Accelerator/Decelerator Oscillator
Learn more →
Commodity Channel Index
Learn more →
Relative Vigor Index
Learn more →
Williams' Percent Range
Learn more →
Gator Oscillator
Learn more →
DeMarker
Learn more →
Fisher Transform
Learn more →
Fisher CG
Learn more →
Laguerre RSI
Learn more →
Momentum
Learn more →
Moving Average of Oscillator
Learn more →
Volume Indicators
Volume indicators measure the strength of price movements by analyzing trading volume. They help confirm trends and identify potential reversals.
Volatility Indicators
Volatility indicators measure the rate of price change. They help traders set stop losses, determine risk levels, and identify potential breakouts.
Bill Williams Indicators
A collection of indicators developed by Bill Williams for trend identification, momentum analysis, and fractal pattern recognition.