Skip to main content

BB

Bollinger Bands are a technical analysis tool that measures relative high and low prices. They consist of three lines: a simple moving average, an upper band, and a lower band. The upper and lower bands are plotted two standard deviations away from the simple moving average.

Traders commonly use Bollinger Bands to identify overbought and oversold conditions in the market. When prices move close to the upper band, it indicates that the market is overbought, and when prices move near the lower band, it suggests that the market is oversold. As a result, traders can use this information to make buy and sell decisions.

Using Bollinger Bands in Gunbot, you can configure the percentage at which to trigger trades. Specifically, you can set the percentage from the lower Bollinger Band at which to buy, and the percentage from the upper Bollinger Band at which to sell. Once prices meet the predetermined distance from the bands, orders are automatically placed by Gunbot.

How to work with it

Buy method conditions

A buy order is allowed when price is below the lower band, and additionally price is at least buy level % below the lowest of EMA1 and EMA2.

Additionally you can use the Low BB setting to change the threshold from the actual lower band, to anywhere between the bands.

Sell method conditions

A sell order is allowed when price is above the upper band. Additionally, the gain % target must be reached.

Additionally you can use the High BB setting to change the threshold from the actual upper band, to anywhere between the bands.

Trading example

Example of how trading with this strategy can perform. Details and settings.

The infographic below describes what triggers trades with this strategy.

Note that this description is kept simple intentionally. In reality prices also need to be below BUY_LEVEL before a buy is triggered.

Buy settings

Buy settings are the primary trigger for buy orders. These parameters control the execution of buy orders when using bb as buy method.

Take Buy is only available for Gunbot Standard and higher.

Buy enabled

Set this to false to prevent Gunbot from placing buy orders.


Buy Level

This sets entry point at a percentage below the lowest EMA.

When you set this to 1, the entry point will be set 1% below the currently lowest EMA.


Sell settings

Sell settings are the primary trigger for sell orders. These parameters control the execution of sell orders when using bb as sell method.

Sell enabled

Set this to false to prevent Gunbot from placing sell orders.


Gain

This sets the minimum target for selling when DOUBLE_CHECK_GAIN is enabled.


Indicator settings

Relevant indicators for trading with BBTA

These settings have a direct effect on trading with bb.

Period

This sets the candlestick period used for trading, this affects all indicators within the strategy.

Only use supported values. The trading settings editor suggests valid values for the selected exchange..

Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.


Low BB

This sets the target for buying. Negative values are allowed.

The bot will buy after prices first move under the set % from the lower Bollinger Band, then cross over the set level.

When set to 0, the lower Bollinger Band is the target. When set to 30, the target is 30% above the lower Bollinger Band - the upper band is at 100% from the lower band. Negative values are allowed.


High BB

This sets the target for selling. Negative values are allowed.

The bot will sell after prices first move over the set % from the upper Bollinger Band, then cross down the set level. Additionally GAIN must be reached.

When set to 0, the upper Bollinger Band is the target. When set to 30, the target is 30% under the upper Bollinger Band - the lower band is at 100% from the upper band. Negative values are allowed.


SMA Period

This defines the number of periods used for calculating Bollinger Bands.


Standard Deviation

This value defines the multiplier used for calculating Bollinger Bands.


Slow EMA

Set this to the amount of candlesticks you want to use for your slow EMA. The closing price for each candle is used in the slow EMA calculation.

For example: when you set PERIOD to 5, and want to use 2h for slow EMA – you need to set EMA1 to 24 (24 * 5 mins).


Medium EMA

Set this to the amount of candlesticks you want to use for your medium EMA. The closing price for each candle is used in the fast EMA calculation.

For example: when you set PERIOD to 5, and want to use 1h for medium EMA – you need to set EMA2 to 12 (12 * 5 mins).