Wealth-Lab Wiki

API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers Pending Deletion PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Tutorial Videos Visualizers


Quick Search
Advanced Search »


public BBandLower(DataSeries source, int period, double stdDevs, string description)
public static BBandLower Series(DataSeries source, int period, double stdDevs)
public static double Value(int bar, DataSeries source, int period, double stdDevs)

Parameter Description

source Price series
period Indicator calculation period
stdDevs Number of standard deviations


Bollinger Bands are a type of price envelope developed by John Bollinger. Bollinger Bands are envelopes that are plotted at a standard deviation level above and below a simple moving average of the price. Because the distance of the bands is based on standard deviation, they adjust to volatility swings in the underlying price.

Bollinger Bands accept 3 parameters, the source DataSeries, period and Standard Deviations, stdDevs. The recommended values are 20 for period, and 2 for standard deviations, although other combinations offer effective results as well.

Bollinger bands help determine whether prices are high or low on a relative basis. They are used in pairs, both upper and lower bands and in conjunction with a moving average. Further, the pair of bands are not intended to be used on their own. Use them to confirm signals given with other indicators. For example, RSI and Bollinger bands are a good combination.


  • When the bands tighten as volatility decreases, expect a sharp move in price. This may begin a trending move. Watch out for a false move in opposite direction which reverses before the proper trend begins.
  • When the bands separated by an unusual large amount, volatility increases and any trend that may be in place may be ending.
  • Prices normally have a tendency to bounce within the bands envelope, touching one band then moving to the other band. You can use this for profit targets. For example, if prices bounces of the lower band then cross above the moving average the upper band then becomes the profit target.
  • Price can exceed or hug a band envelope for prolonged periods during strong trends. On divergence with a momentum oscillator you should consider taking profits.
  • A strong trend continuation can be expected when the price moves out of the bands. However if prices move immediately back inside the band, then the suggested strength is negated.


First calculate and plot a simple moving average. Calculate the standard deviation using the same data used in the simple moving average. For the upper band, add the standard deviation to the moving average, for lower band, subtract the standard deviation from the moving average.

Typical values used:
  • Short term: 10 day moving average, bands at 1.5 standard deviations.
  • Medium term: 20 day moving average, bands at 2 standard deviations.
  • Long term: 50 day moving average, bands at 2.5 standard deviations.

Note: The version of Bollinger Bands in the Standard.Indicators was changed to the StdDevCalculation.Sample method so that it matches the Version 4 indicator. (Version 5.5 and up)


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { PlotSeries( PricePane, BBandLower.Series( Close, 10, 1.50 ), Color.DarkBlue, LineStyle.Solid, 2 );

// Flag bars that have penetrated the lower BBand

for(int bar = 10; bar < Bars.Count; bar++) { if( Bars.Low[bar] < BBandLower.Series( Close, 10, 1.50 )[bar] ) SetBarColor( bar, Color.Lime ); } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

Used under license from FMR Corp. Copyright 2008 FMR Corp. All rights reserved.

ScrewTurn Wiki. Some of the icons created by FamFamFam.