Home  ›  block algo flex  ›  Documentation  ›  Bollinger Bands %B

Bollinger Bands %B

Bollinger Bands %B

Bollinger Bands %B (Percent Bandwidth) tells you where the current price sits relative to the Bollinger Bands. It converts the position between the upper and lower bands into a value between 0 and 1 — making it easy to set precise signal thresholds.

How it works: The Bollinger Bands are calculated using a Simple Moving Average (middle band) with upper and lower bands placed at a specified number of standard deviations above and below. %B = (Price - Lower Band) / (Upper Band - Lower Band).

Settings in block algo flex

SettingDescriptionDefault
Use Bollinger Bands %B?Enable/disable the indicatorOff
InpBB_lengthNumber of periods for the SMA and standard deviation20
SourcePrice component for calculationclose
StdDevNumber of standard deviations for band width2
TimeframeTimeframe for calculationChart
Buy ConditionTriggers buy when %B meets this condition (e.g., "Less Than 0")Less Than 0
Sell ConditionTriggers sell when %B meets this condition (e.g., "Greater Than 1")Greater Than 1

How to Interpret

  • %B > 1 — Price is above the upper band (potential overbought / breakout)
  • %B < 0 — Price is below the lower band (potential oversold / breakdown)
  • %B = 0.5 — Price is at the middle band (SMA)

Pro Tip: Bollinger Bands %B works best for mean-reversion strategies. Combine it with a trend filter like ADX or EMA Price to avoid trading against strong trends where price can stay outside the bands for extended periods.

This is a static view of a single section. For full search and interactivity visit the docs app. Open interactive docs →