StockBeatStockBeat
Basics
  • Number Series
  • Boolean Series
  • Examples
  • Indicators
Alarms
Concepts
Basics
  • Number Series
  • Boolean Series
  • Examples
  • Indicators
Alarms
Concepts
  • Signals

    • Number Series
    • Boolean Series
    • Signal Examples
    • Indicators

      • Indicators
      • MFI (Money Flow Index)
      • ATR (Average True Range)
      • CCI (Commodity Channel Index)
      • CE (Chandelier Exit)
      • ER (Kaufman's Efficiency Ratio)
      • KC (Keltner Channel)
      • SMA (Simple Moving Average)
      • EMA (Exponential Moving Average)
      • MACD (Moving Average Convergence Divergence)
      • PPO (Percentage Price Oscillator)
      • RSI (Relative Strength Index)
      • FSO (Fast Stochastic Oscillator)
      • SSO (Slow Stochastic Oscillator)
      • BB (Bollinger Bands)
      • MAD (Mean Absolute Deviation)

BB (Bollinger Bands)

Bollinger Bands (BB) are a volatility indicator composed of three lines. The middle band is a simple moving average (SMA), and the upper and lower bands are typically two standard deviations above and below the SMA. The bands widen when volatility increases and narrow when volatility decreases. Bollinger Bands are used to identify overbought and oversold levels, and to spot potential breakouts.

Arguments

NameDescription
periodnumber of candles
multipliermultiplier
typeone of avg, up or low

Useful Signal Expressions

1. Breakout Above Upper Band

Signal:

close().crosses_above(close().bb(20, 2, up))

Explanation: The price crosses above the upper Bollinger Band, which could indicate a breakout.

2. Breakdown Below Lower Band

Signal:

close().crosses_below(close().bb(20, 2, low))

Explanation: The price crosses below the lower Bollinger Band, which could indicate a breakdown.

3. Bollinger Band Squeeze

Signal:

close().bb(20, 2, up).sub(close().bb(20, 2, low)).falling(10)

Explanation: The width of the Bollinger Bands is decreasing for 10 periods, which is known as a "squeeze". This often precedes a significant price move.

Last Updated:: 2/12/26, 8:03 AM
Contributors: ErenKizilay
Prev
SSO (Slow Stochastic Oscillator)
Next
MAD (Mean Absolute Deviation)