Bollinger Bands Strategy


Bollinger Band Strategy is a strategy build to gain profit on alternately buying and selling shares. Bollinger Band Strategy calculates values to draw out three lines:

  • Middle line (mb) - simple moving average (SMA) of prices
  • Upper line (ub) - middle line plus standard deviation of price multiplied by a standard deviation impact parameter
  • Lower line (lb) - middle line minus standard deviation of price multiplied by a standard deviation impact parameter

In the moment when the price crosses the upper or lower band from the proper side it is a signal for a strategy to make an order.

Market Data

  • Last trade


Parameter name Description Essential
Number of Periods Number of last prices which are used to compute each value of all the lines Yes
Standard Deviation Impact It is a factor by which standard deviation is multiplied in a computation of an upper and lower lines Yes


Open position

Side Buy or Sell
Amount One asset per order
Price Last market price
Type Price limit

If lower line is crossed by the last price line from the top side then buy order is sent. Similarly, when the upper line is crossed from the bottom side by the last price line the sell order is sent. Buy and sell orders are sent alternately, so if lower (upper) line is crossed by price from the top (bottom) side two times which are not separated by a crossing of a upper (lower) line then only one order is sent by a strategy.

Close position

Positions are open and close alternately when proper levels are crossed. So it is not possible to open one position if the other is not close.


There is no strategy termination condition.

Time frame

Strategy bases on some initial Number of Periods of data collection without trading and is designed to enable adjusting both: period of data collection and its trading time span from hours to whole weeks.

Further information & source

PLEASE NOTE: Empirica does not provide tax, investment, or financial services. The information available through this website is provided on an "as is" basis at user's sole risk and does not constitute trading advice or a solicitation to buy or sell any stock, option, future, commodity, or forex product. Empirica makes no guarantees as to the accurateness, quality, or completeness of the information and shall not be responsible or liable for any errors, omissions, inaccuracies in the information or for any user's reliance on the information. User is solely responsible for verifying the information as being appropriate for user's personal use, including without limitation, seeking the advice of a qualified professional regarding any specific financial questions a user may have. Past performance is not necessarily an indication of future performance. Trading is inherently risky.