Skip to content

BB (Bollinger Bands)

What it shows: a middle line (a simple moving average) with a band above and below it. The bands widen when price swings a lot and tighten when it is calm.

How people use it: price crossing below the lower band means it fell unusually far, and mean-reversion strategies buy there expecting a return to the middle. Price crossing the upper band can be a sell, or in a strong trend a breakout.

Pairs well with: RSI (to confirm oversold), ADX (bands work best in sideways markets) and Bollinger BandWidth to spot a squeeze.

Settings

Setting Default What it does
Length 20 How many candles the middle line averages. Shorter follows price closer.
Std dev 2.0 How wide the bands are (in standard deviations, a measure of how spread out prices are). Wider (2.5, 3) is reached less often: fewer, more extreme signals.

You set the defaults on the Indicators page. A condition can use its own settings, which override the defaults for that condition only.

Ready-made conditions

For Condition Fires when
Buy Price crosses lower band the one candle price moves from above the Lower band line to below it
Buy or sell Price touches SMA (middle band) line price reaches the Middle band line during the candle, from either side
Sell Price crosses upper band the one candle price moves from below the Upper band line to above it

"Above", "below", "is" and "rising" / "falling" stay true on every candle the state lasts, so they can fire many candles in a row. "Crosses" and "flips" fire once, on the candle it happens, so you get one signal per move.

Warnings you may see

  • "It can never be true: a cross happens on one candle, so it cannot happen on N candles in a row. Use 'within the last N candles' instead.": a "crosses" condition with a "… in a row" lookback of 2 or more. Switch the lookback to Within the last.
  • "Length must be between 1 and 1000" / "Length must be a whole number": shown in the condition editor when a condition's own value is out of range. Fix the number; the condition can't be saved until then.
  • "Std dev must be between 0.1 and 10": shown in the condition editor when a condition's own value is out of range. Fix the number; the condition can't be saved until then.

Where they show: on the Strategies page, open Create entry conditions / Edit entry conditions (or the exit ones). Each condition's messages appear right under it. The setting messages ("must be between", "whole number", "must be one of", "must be smaller than") start with the indicator's short name, for example "MACD: Fast must be between 1 and 1000", and keep the conditions from being saved until fixed. The other warnings never block saving and are repeated in the strategy's Entry or Exit section, starting with the condition's name.

Good to know

  • It is worked out from closing prices only (not volume).
  • It needs some history before its value settles: the length in candles (20 at length 20). Apathia loads that history for you.
  • The middle line is a simple moving average (SMA) of the length you set.