Register
Strategy guide

Build Rules for a Bollinger Band Breakout

Bollinger Bands surround a moving average with two lines set a number of standard deviations above and below it. When volatility is low, the bands squeeze together; when it rises, they widen. A Bollinger Band breakout strategy waits for a squeeze, then trades the expansion that often follows as the price breaks out.

QuantPower Research · Updated 14 Nov 2026 · 17 min read

The idea is simple: quiet markets do not stay quiet. The hard parts are telling a real breakout from a false one, placing the stop, and letting the winners run long enough to pay for the many small losses. This guide explains how Bollinger Bands are calculated, how to measure a squeeze, complete breakout rules, worked examples on a stock and on Nifty futures, how to filter false breakouts, the option versions, costs, and how to build, test and run the strategy in QuantPower.

At a glance

Bollinger Band breakout
StyleVolatility breakout, trend following
InstrumentsIndex futures, stocks, commodities
Timeframe15-minute to daily candles
Indicator20-period moving average with bands at 2 standard deviations
SetupA squeeze: the bands at their narrowest in months
EntryA close outside the band after the squeeze
ExitA close back inside the middle band, or a trailing stop
Win rateUsually below half; larger wins pay for more frequent small losses

A short history of Bollinger Bands and the squeeze

Bands around a moving average are older than Bollinger Bands. In 1960 the grain trader Chester Keltner described a channel drawn around a 10-day average using the average daily range, and traders in the 1970s drew percentage envelopes a fixed distance above and below an average.2 Both had the same weakness: the distance did not change when the market became calmer or more volatile.

John Bollinger, a market analyst in California, fixed that in the early 1980s by setting the bands a number of standard deviations from a 20-period average. When prices swing widely, the standard deviation rises and the bands move apart; when prices settle, the bands contract.1 He later added two measures that made the bands easier to use in rules: %b, which shows where the price sits inside the bands, and Bandwidth, which shows how far apart they are. In *Bollinger on Bollinger Bands*, published in 2001, he described "the Squeeze": Bandwidth falling to a multi-month low, which often comes before a large move.1

Breakout traders took the squeeze up quickly, because it gave a way to wait for a quiet market before betting on a move. In India, Bollinger Bands became a standard indicator on retail charting platforms in the 2000s and are now among the most used on Nifty, Bank Nifty and stock charts. Arth.live charts, inside QuantPower, include Bollinger Bands, %B and Bandwidth as separate indicators.

How Bollinger Bands are calculated

  • Middle band: the 20-period simple moving average of the close.
  • Upper band: the middle band plus 2 standard deviations of the last 20 closes.
  • Lower band: the middle band minus 2 standard deviations.

Two related measures help with breakouts:

  • Bandwidth: (upper band − lower band) ÷ middle band. Low bandwidth means a squeeze.
  • %b: where the price sits within the bands. Above 1 means above the upper band; below 0 means below the lower band.

Example. If the 20-day average is ₹500 and the standard deviation of the last 20 closes is ₹6, the bands are at ₹488 and ₹512. Bandwidth is 24 ÷ 500 = 4.8%.

With bands at 2 standard deviations, about 95% of closes would fall inside them if prices were normally distributed. Market prices are not quite normal: they have more large moves than that model expects. A close outside the band is unusual, but not rare, and in a trend it can happen many times in a row.

Settings beyond 20 and 2

The standard 20-period average with bands at 2 standard deviations is a starting point, not a rule. Bollinger himself suggested widening the bands slightly for longer averages and narrowing them for shorter ones: about 1.9 standard deviations for a 10-period average and 2.1 for a 50-period one, so that the bands contain a similar share of closes.1 For breakouts, some traders use slightly wider bands, such as 2.5 standard deviations, so that a close outside them is a stronger statement; the cost is fewer signals and later entries. Whatever you choose, keep it for all instruments on the same timeframe and test it across several years. A setting tuned to one stock's last year is unlikely to hold.

Choosing the timeframe

Daily candles suit swing traders: squeezes form over weeks, breakouts run for days or weeks, and the overnight gap is part of the risk. Hourly and 15-minute candles give more setups, smaller moves and higher costs as a share of each trade. Weekly candles give a handful of signals a year, each potentially large. Pick the timeframe that matches how long you can hold a trade and how often you can watch it, then test on that timeframe only.

Why squeezes lead to breakouts

Volatility tends to move in cycles: quiet periods are often followed by active ones. A squeeze shows a market coiling, with buyers and sellers in balance and the range narrowing. It does not say which way the breakout will go, which is why the strategy waits for the price to choose a direction before entering.

The cycle has a practical consequence. Because the bands are narrowest just before the break, a stop at the middle band or on the far side of the squeeze is close to the entry. The first part of the risk is small; the reward, if the breakout becomes a trend, can be many times larger. That asymmetry is what the strategy tries to capture.

Measuring the squeeze

Bandwidth has no fixed "low" level: a 3% bandwidth is quiet for a volatile stock and normal for Nifty. Two common ways to define a squeeze:

  • Relative low: Bandwidth at its lowest level in the last 120 candles, about six months of daily candles.
  • Below its own average: Bandwidth below a set share of its 120-period average, such as 60%.

A third method compares Bollinger Bands with Keltner Channels: when the Bollinger Bands move inside the Keltner Channels, which are based on ATR, volatility by standard deviation is low compared with the average range. Both indicators are on the Arth chart.

The rules

  1. Find the squeeze. Bandwidth falls to its lowest level in the last 120 candles, or below a chosen threshold.
  2. Wait for a close outside a band. Buy on a close above the upper band; sell on a close below the lower band.
  3. Confirm, if you want. Require volume above its 20-period average on the breakout candle.
  4. Stop. Place the stop at the middle band or on the opposite side of the squeeze range.
  5. Exit. Close the trade when the price closes back below the middle band, or trail the stop under recent lows.

A worked example on a stock

This is a hypothetical example, not a result.

  • A stock's bandwidth on a daily chart falls to 4.5%, its lowest in six months. The bands sit at ₹492 and ₹514.
  • A candle closes at ₹517, above the upper band, on volume twice its 20-day average.
  • The order buys 200 shares at the next open, ₹518, with a stop at the middle band, ₹503. The risk is 200 × ₹15 = ₹3,000.
  • The stock trends to ₹560 over three weeks, then closes at ₹541, below the rising middle band.
  • The position is sold at the next open, ₹540, for a gain of 200 × ₹22 = ₹4,400 before costs.
Bollinger Band breakout rules: squeeze with bands at ₹492 and ₹514, buy ₹518 after a close above the upper band on double volume, stop ₹503, sell on a close below the middle band (illustration)

The trade made about 1.5 times its risk, though the stock had been ₹42 above the entry at its high. The middle-band exit gave back most of that, as it is designed to: it stays in the trade until the trend has clearly paused.

A worked example on Nifty futures

Again hypothetical. On the daily chart of Nifty futures, the 20-day average is 25,000 and the standard deviation of the last 20 closes is 150 points. The bands are at 24,700 and 25,300, and Bandwidth is 2.4%, the lowest in five months.

  1. Breakout. The futures close at 25,340, above the upper band, on volume well above average.
  2. Entry. One lot is bought at the next open, 25,350.
  3. Stop. The middle band, 25,010, a risk of 340 points or ₹22,100 on one lot of 65.3
  4. The trend. Over the next four weeks the futures reach 25,900, and the rising middle band climbs to 25,620.
  5. Exit. A close at 25,600, below the middle band, closes the trade at the next open, 25,590: a gain of 240 points, ₹15,600, before about ₹977 of costs for the round trip.4

The trade made about 0.7 times its initial risk, less than the stock example, and gave back 310 points from the high. On futures, a trailing stop under the last swing low, or an ATR-based trail, would have kept more of this move, and would have cut many other trades short. Which exit suits the rule is a question for the backtest, not for a single example.

A downside example

Breakouts work both ways. Hypothetically, a stock trades in a tight range for two months, and its daily Bandwidth falls to its lowest in half a year with the bands at ₹1,180 and ₹1,240. A close at ₹1,172, below the lower band, comes on volume twice its average.

  1. Entry. One lot of the stock's futures is sold at the next open, ₹1,170. The lot is 500 shares.
  2. Stop. The middle band, ₹1,210, a risk of ₹40 per share, ₹20,000 per lot.
  3. The fall. Over the next two weeks the stock falls to ₹1,080, and the falling middle band reaches ₹1,125.
  4. Exit. A close at ₹1,128, above the middle band, closes the trade at the next open, ₹1,130: a gain of ₹40 per share, ₹20,000 per lot, before costs.

Stock futures carry two extra risks. A result or news gap can jump the stop by much more than the planned ₹40, and stock futures held to expiry settle by delivery of shares, so a trade that lasts into the expiry week has to be closed or rolled.

Reading %b during the trade

%b turns the bands into one number. At 1 the price is at the upper band; at 0.5, at the middle band; at 0, at the lower band. In a strong upside breakout, %b stays above 0.8 for many candles and touches 1 again and again, which is a sign of strength, not of an overbought market. When %b starts falling back towards 0.5 while the price still rises slowly, the trend is losing force relative to its own volatility. Some traders tighten the stop at that point; others wait for the middle-band exit. The choice should be tested, not decided trade by trade.

Using ATR exits with a Bollinger entry

The middle-band exit is slow because the 20-period average lags. An exit based on ATR, such as a stop three times ATR below the highest close since entry, keeps a fixed distance in volatility terms and often closes a fading trade earlier. On the Nifty example above, a 3-ATR trail with ATR near 200 points would have sat at about 25,300 when the futures were at 25,900, and closed the trade at a similar level to the middle band. In faster trends the two exits can differ by hundreds of points. The Bollinger entry and the ATR exit answer different questions, and combining them is common.

Breakouts on intraday charts

On 15-minute candles the rules are the same, with three changes:

  • Skip the opening candle. The first 15 minutes after 9:15 am absorb the overnight gap and distort both the bands and Bandwidth.
  • Use a shorter squeeze window. 120 candles of 15 minutes is about five sessions; a squeeze over that window is a day-scale coil, not a month-scale one.
  • Close before the end of the session. Intraday breakouts that have not run by 3:15 pm are closed, whatever the bands say.

Intraday breakouts are more frequent and smaller in points, so costs take a larger share of each gain. A breakout rule that works on daily candles often does not survive the move to 15-minute candles once costs are counted.

Finding squeezes across many instruments

One instrument may show a squeeze a few times a year. Across a list of instruments, setups appear every week. QuantPower's scanner runs preset scans and your own conditions across a chosen universe, such as Nifty 50, Nifty 500, F&O stocks or your own watchlist, on daily or intraday candles. A scan for Bandwidth at a multi-month low gives a short list of instruments in a squeeze; a second condition, a close above the upper band, gives the ones breaking out today. The scan only finds candidates. The rules decide the trade.

Squeezes in commodities

MCX commodities follow the same volatility cycles, often more sharply. Crude oil can sit in a narrow range for days before a supply report or a central bank decision abroad moves it several per cent in an evening session. Gold tends to squeeze before US data releases. The rules carry over, with two changes: the session runs into the late evening, so the daily candle closes later than for equities, and the contract sizes are different, so positions must be sized from the rupee value of the stop, not from habit.

False breakouts

The main risk is a break that immediately reverses. Prices can close outside a band, then fall back inside and break out the other way. Ways to reduce false breakouts:

  • Require volume confirmation on the breakout candle. See the volume breakout strategy.
  • Require two closes outside the band instead of one.
  • Filter by trend, taking only upside breakouts when the longer-term trend is up, for example when the price is above its 200-day average.
  • Exit quickly if the price closes back inside the bands within a set number of candles.
  • Watch for the head fake. Bollinger himself noted that the first move out of a squeeze is often a false one in the opposite direction to the real break. Some traders wait for the second break, or require the break to hold for two candles.

Each filter removes some false breakouts and some real ones. Test each one alone before combining them; stacking five filters usually leaves too few trades to judge anything.

Breakout vs mean reversion with Bollinger Bands

The same bands support two opposite strategies. A breakout strategy buys strength above the upper band after a squeeze. A mean reversion strategy buys weakness below the lower band and targets the middle band. The squeeze filter is what separates them: breakouts follow quiet periods, while mean reversion works best in ranges where the bands are steady. See the bollinger band mean reversion strategy guide for the other approach.

BreakoutMean reversion
SetupA squeezeSteady bands in a range
EntryA close outside a band, with the breakA close outside a band, then back inside
DirectionWith the breakAgainst the stretch
TargetOpen; trail the stopThe middle band
Win rateUsually lowerUsually higher
Typical lossSmall and frequentLarger when a trend begins

Trading the breakout with options

A breakout on Nifty can be traded with options instead of futures, so the most you can lose is fixed at entry. Two common choices:

  • A long call after an upside break, or a long put after a downside break. The whole premium is at risk, but there is no stop to be gapped through.
  • A debit spread, such as a bull call spread, which costs less and caps the gain at the short strike.

Breakouts that become trends take days or weeks, so monthly expiries suit them better than weekly ones, whose time decay works against a slow move. Option legs in QuantPower can carry their stop in underlying points, so the option trade can still be closed when the index closes back below the middle band.

Position sizing and risk

Size each trade by the distance to the stop, using the position size calculator. Breakout strategies usually win less than half the time, with larger wins paying for smaller losses, so expect losing streaks and check them in your backtest.

A rule that wins 40% of the time has a good chance of a run of seven or eight losses in a row somewhere in a hundred trades. At 1% risk per trade, that is a drawdown of about 7% to 8% before the next winner, which is normal for this kind of strategy. At 5% risk per trade, the same run would cost a third of the account.

What it costs to trade

A round trip in one Nifty futures lot costs about ₹977 in brokerage and statutory charges at the rates from 1 April 2026, most of it the STT on the sale.4 For a stock bought and sold the next week, delivery charges apply instead, including STT on both sides. Stops also slip in fast markets: a breakout that fails often fails sharply, and the stop fills a few points beyond its trigger. Count both in the backtest.

Building the strategy in QuantPower

QuantPower runs rules on your own broker account, through the two static IPs included with every account.

  1. Set up the chart. Add Bollinger Bands, Bandwidth and, if you use it, a volume average to the Arth chart in the app.
  2. Test the rule. QuantPower's rule backtest reads up to 2,000 past candles of one instrument from your broker, from 5-minute to daily. Write the entry as "close crosses above the upper Bollinger Band" and "Bandwidth below" your squeeze level, set the stop in per cent, and add the exit rule "close crosses below the middle band". Slippage and charges are deducted from every trade. See backtesting.
  3. Create the signal. In Algos → Signal algos, set the same conditions on closed candles, from 1 minute to 1 week. A signal can combine up to 20 conditions in ALL and ANY groups, using any chart indicator, candle pattern or chart pattern.
  4. One-touch or auto. In one-touch mode, the signal tells you when it fires and the order is ready to place with one touch. In auto mode, once armed, the signal places the order itself with every risk check. A signal that places its own order costs no tokens.
  5. Set the stop. Place the stop as a GTT order, which can wait up to 365 days, or as a two-leg OCO with a target, where the first to trigger cancels the other. A second signal on the exit condition can close the position.
  6. Forward test. Point the signal at your Forward test account first. See forward test.

For an option version, a signal can start an option algo: for example, a long call or a bull call spread from the Option bots templates, with its own exits and an exit time.

Reviewing the trades

Breakout strategies are easy to abandon after a run of small losses, just before the trade that pays for them. Keep a simple record for each trade: the Bandwidth at entry, the breakout candle's volume, the stop distance, the result in multiples of the initial risk, and whether the exit came from the stop, the middle band or the trail. After thirty or forty trades, the record shows whether the losers share a feature, such as a low-volume breakout or a break against the longer trend, that a filter could remove.

Account safety above the rules

Smart Exit sets a profit target, a stop-loss and a trailing step for the whole account; on a hit it stops the algos and squares off. The daily loss limit refuses new orders once today's loss reaches it. The kill switch stops a segment until its next session. They cover every connected broker together.

Backtesting tips

  • Use enough history to include several squeezes and both trending and range-bound periods.
  • Act on closed candles. A close above the band that disappears by the end of the candle is not a signal.
  • Test the squeeze definition separately from the exit; a change in both at once tells you little.
  • Count the trades. Squeezes are rare on daily charts; a rule with twenty trades over five years is thin evidence.
  • Check the longest losing streak and make sure you could sit through it.

Who the strategy suits

The Bollinger breakout suits a patient trader who can wait weeks for a setup, accept that most breakouts fail, and hold the few that work without taking profit too early. It suits automation well, because the setup is easy to define in rules and hard to watch by hand across many instruments. It does not suit a trader who needs to be right most of the time, or one who moves the stop when a breakout stalls.

Common Bollinger breakout mistakes

  • Buying every close above the upper band. Without a squeeze, it is often a sign of an extended move, not a new one.
  • Placing the stop too far away. The squeeze makes a close stop possible; use it.
  • Taking profit too early. The strategy depends on a few trends that run; a fixed small target cuts them off.
  • Ignoring the head fake. The first break after a squeeze often reverses.
  • Optimising the settings to one stock's history.
  • Trading through results or events without sizing down. A squeeze before a known announcement is a coil with a date on it, and the gap can jump any stop.
  • Skipping the record. Without notes on each trade, there is no way to tell a bad filter from bad luck.

Where Bollinger breakout trading is going

The bands have not changed since the 1980s, but the way traders use them has. Charts that compute Bandwidth and %B directly, scanners that list instruments in a squeeze, and signal algos that act on closed candles let a trader watch dozens of instruments for a setup that once needed hours at a chart. The retail algo framework in force since 1 April 2026 brings such signal-driven rules through brokers under exchange oversight.5 What still decides the result is the same as ever: filtering false breakouts, sizing for losing streaks, and letting the few large trends run.

Start with 500 free tokens

Connect your broker, build a strategy and test it on paper before a single live order goes out.

Frequently asked questions

What is a Bollinger Band squeeze?

A period when the bands narrow to their tightest in a long while, showing unusually low volatility. Squeezes are often followed by larger moves.

Is a close above the upper band a buy signal?

Not on its own. In a mean reversion strategy it can be a sign of overextension. In a breakout strategy it is a signal only after a squeeze and, ideally, with confirmation.

What settings should I use?

The standard is a 20-period average with bands at 2 standard deviations. Test small changes rather than optimising one exact setting.

Does this work on Nifty?

Bollinger breakouts are widely used on Nifty futures and stocks. They work best when quiet periods give way to trends, and poorly when breakouts keep failing.

How long does a squeeze usually last before the break?

There is no fixed length. On daily charts a squeeze can last from a week to several months; on 15-minute charts, from a few hours to a few sessions. The breakout rule waits for the close outside the band, however long that takes.

References

  1. John Bollinger, *Bollinger on Bollinger Bands* (McGraw-Hill, 2001)
  2. Chester W. Keltner, *How to Make Money in Commodities* (1960)
  3. NSE, Nifty futures contract specifications (nseindia.com)
  4. Union Budget 2026-27: securities transaction tax on futures and options raised from 1 April 2026 (indiabudget.gov.in)
  5. SEBI, circular on safer participation of retail investors in algorithmic trading, 4 February 2025, in force for every broker from 1 April 2026 (sebi.gov.in)
The examples on this page are hypothetical and for illustration. Trading involves substantial risk. This guide is for education and is not investment advice.