Skip to content

BollingerBands.Top

property · BollingerBands · cAlgo.API.Indicators

DesktopCLICloud

Upper Bollinger Band.

Definition

IndicatorDataSeries Top {get;}
bollingerBands.Top: IndicatorDataSeries

Returns IndicatorDataSeries — The Upper Bollinger Band result.

Examples

var bollingerBands = Indicators.BollingerBands(Bars.ClosePrices, 20, 2, MovingAverageType.Simple);
if (Bars.HighPrices.Last(1) >= bollingerBands.Top.Last(1))
    Print("The last bar touched the Top band at {0}", bollingerBands.Top.Last(1));
bollingerBands = api.Indicators.BollingerBands(api.Bars.ClosePrices, 20, 2, MovingAverageType.Simple)
if api.Bars.HighPrices.Last(1) >= bollingerBands.Top.Last(1):
    api.Print(f"The last bar touched the Top band at {bollingerBands.Top.Last(1)}")