Bollinger Bands are used to confirm signals. The bands indicate overbought and oversold levels relative to a moving average.


Bollinger bands widen in volatile market periods, and contract during less volatile periods. Tightening of the bands is often used a signal that there will shortly be a sharp increase in market volatility.


public interface BollingerBands


Bottom PropertyLower Bollinger Band.
Main PropertyMoving Average (Middle Bollinger Band).
Top PropertyUpper Bollinger Band.

Example 1

public class SampleRobot : Robot
public DataSeries Source { get; set; }
[Parameter("BandPeriods", DefaultValue = 14)]
public int BandPeriod { get; set; }
[Parameter("Std", DefaultValue = 14)]
public int std { get; set; }
public MovingAverageType MAType { get; set; }
private BollingerBands boll;
protected override void OnStart()
    boll = Indicators.BollingerBands(Source,BandPeriod,std,MAType);
protected override void OnBar()
    Print("Current Main Bollinger Band's price is: {0}", boll.Main.LastValue);
    Print("Current Bottom Bollinger Band's price is: {0}", boll.Bottom.LastValue);
    Print("Current Top Bollinger Band's price is: {0}", boll.Top.LastValue);