# Bollinger Bands

Overview

Bollinger Bands are a technical analysis tool developed by John Bollinger in the 1980s for trading in the financial markets. They are statistical chart boundaries used to measure the 'highness' or 'lowness' of the price relative to previous trades and are associated with the volatility of the market.&#x20;

### Calculation

Bollinger Bands consist of:

* A middle band being an N-period simple moving average (SMA)
* An upper band at K times an N-period standard deviation above the middle band (SMA + Kσ)
* A lower band at K times an N-period standard deviation below the middle band (SMA - Kσ)

Where:

* N and K are usually 20 and 2, respectively.
* σ is the standard deviation.

### Interpretation

Bollinger Bands are interpreted as follows:

* When the bands come close together (constrict), it denotes low market volatility and may be a precursor to sharp price movements.
* When the bands move apart (expand), it signifies high market volatility.
* Prices are considered high when touching the upper band and low when touching the lower band.

## Indiciator Triggers:

You cant select 3 levels to trade for the Bollinger Bands indicator, upper, mid and lower band, which are described in the image below:

<figure><img src="/files/j4PyP8StQslM2aSrvL3q" alt=""><figcaption></figcaption></figure>

### Price cross up/down the band

We consider only body closes for this trigger. If the price cross up/down the band (wick), but the candle body close is in the bands, no signal is triggered.

<figure><img src="/files/0cV99BlHH4V4tS6RjE3t" alt="" width="563"><figcaption><p><strong>Place a short signal when the price cross up the upper band</strong></p></figcaption></figure>

<figure><img src="/files/RCJ1SlriXHyuKWV6FkFR" alt=""><figcaption><p><strong>The price cross up the upper band and closed above, a short signal is triggered.</strong></p></figcaption></figure>

### Price touch up/down the band

This trigger is almost like the same as described above, but it is not necessary to wait for a body close. As soon as the price touch/wick the band, a signal is triggered.

<figure><img src="/files/yO8nvDhI79M7pkEYSIKR" alt="" width="563"><figcaption><p><strong>Place a short signal when the price touch up the upper band.</strong></p></figcaption></figure>

<figure><img src="/files/pYz6fcYukGrwUkyipE7b" alt=""><figcaption><p><strong>At the red arrow candle, the price touched the upper band. A short signal is immediatly triggered even before the current candle closes.</strong></p></figcaption></figure>

### Price cross up/down the % band level

You can also trade the Bollinger Bands within a % range.&#x20;

<figure><img src="/files/vHQxNRceqN9oG54BSplt" alt="" width="563"><figcaption><p><strong>Place a long signal if the price cross down the level -25% of the Bollinger Bands %.</strong></p></figcaption></figure>

<figure><img src="/files/Oa4UjwlaDjiJFPg3AbjU" alt=""><figcaption><p><strong>The Bollinger % cross down the level -25 at the green arrow, a long signal is triggered.</strong></p></figcaption></figure>

### Bollinger Band Distance

You can trade a specific distance of the price against the lower, upper or middle band.

<figure><img src="/files/0pUE47ZOW4SnrGtkvj5o" alt="" width="563"><figcaption><p><strong>Place a short signal as soon as the Lower band is under the price at a distance between 8 and 10%.</strong></p></figcaption></figure>

<figure><img src="/files/RbShpq8D8zWXMUzn6pi0" alt=""><figcaption><p><strong>The Lower band enter the zone distance of [8%-10%] away from the price, a short signal is triggered.</strong></p></figcaption></figure>

This trigger works exactly the same way with the distance ATR.

### Option : Includes price reversal into the candle wick <a href="#option-includes-price-reversal-into-the-candle-wick" id="option-includes-price-reversal-into-the-candle-wick"></a>

<figure><img src="/files/dbPD7x7MPqNeGJXOkifC" alt="" width="321"><figcaption><p>Feature available on some bands / line indicators</p></figcaption></figure>

If this option is deactivated, the touch is triggered only if the opening of the candle is in the correct zone (touch up = opening below the trigger price).

With this option activated, even if we start above the trigger price (in the case of a touch up), if during the candle the price dumps below the trigger price and then reverses above, then we trigger at the moment of the internal touch up.

**Note** : for now, whether it's ON or OFF it only triggers once per candle max (duration of the trigger for the rest of the candle).

Example with this option OFF :

<figure><img src="/files/BqORwAnKLYVvz023NI1Z" alt="" width="365"><figcaption><p>Deactivated feature Includes price reversal into the candle wick</p></figcaption></figure>

Example with this option ON :

<figure><img src="/files/WqRPetEWm0eivd0MQLSp" alt="" width="363"><figcaption><p>Activated feature Includes price reversal into the candle wick</p></figcaption></figure>

### Notes :&#x20;

**Identifying Overextended Prices:**

* **Spotting Reversals:** Bollinger Bands consist of a middle band (which is a moving average, typically the 20-period SMA) and two outer bands (standard deviations away from the middle band). When the price touches or crosses the upper Bollinger Band, the market may be considered overbought; conversely, when it touches or crosses the lower band, it may be considered oversold.
* **Trade Setup:** You can use these instances as signals to enter a mean reversion trade—selling near the upper band and buying near the lower band, with the expectation that the price will revert back to the middle band.

**Breakouts and Continuations:**

* **Band Breakouts:** When the price breaks through the upper Bollinger Band strongly, it can signal the start of an upward trend. Similarly, a strong break below the lower band may indicate the beginning of a downward trend. Ensure the breakout is accompanied by increased volume for additional confirmation.
* **Riding the Bands:** In a strong trend, prices can "walk the band," consistently touching or staying near the outer band. You can enter trades in the direction of the trend when the price bounces off the outer bands and aim to exit when it touches the opposite band or shows signs of weakening momentum.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.runbot.io/indicators/runbot-indicators/bollinger-bands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
