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
- Description
- Values
- Order types
- Name
Set this to false to prevent Gunbot from placing buy orders.
Values: true or false
Default value: true
Affects | Does not affect |
---|---|
Strategy buy | Strategy sell |
DCA buy | Stop limit |
RT buy | Close |
RT buyback | RT sell |
Parameter name in config.js
: BUY_ENABLED
Buy Level
- Description
- Values
- Order types
- Name
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.
Values: numerical, represents a percentage.
Default value: 1
Affects | Does not affect |
---|---|
Strategy buy | Strategy sell |
Stop limit | |
Close | |
RT sell | |
DCA buy | |
RT buy | |
RT buyback |
Parameter name in config.js
: BUY_LEVEL
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
- Description
- Values
- Order types
- Name
Set this to false to prevent Gunbot from placing sell orders.
Values: true or false
Default value: true
Affects | Does not affect |
---|---|
Strategy sell | Strategy buy |
Stop limit | RT buy |
RT sell | RT buyback |
Close | |
DCA buy |
Parameter name in config.js
: SELL_ENABLED
Gain
- Description
- Values
- Order types
- Name
This sets the minimum target for selling when DOUBLE_CHECK_GAIN
is enabled.
Values: numerical – represents a percentage.
Default value: 0.5
Affects | Does not affect |
---|---|
Strategy sell | Strategy buy |
RT buy | |
RT buyback | |
RT sell | |
Close | |
DCA buy | |
Stop limit | |
Parameter name in config.js
: GAIN
Indicator settings
Relevant indicators for trading with BBTA
These settings have a direct effect on trading with bb
.
Period
- Description
- Values
- Order types
- Name
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.
Values: numerical– represents candlestick size in minutes.
Default value: 15
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
DCA buy (when using an indicator to trigger) | RT sell |
Close | |
Stop limit |
Parameter name in config.js
: PERIOD
Low BB
- Description
- Values
- Order types
- Name
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.
Values: numerical – represents a percentage.
Default value: 0
Affects | Does not affect |
---|---|
Strategy buy | RT buy |
RT buyback | |
RT sell | |
Close | |
Stop limit | |
Strategy sell | |
DCA buy |
Parameter name in config.js
: LOW_BB
High BB
- Description
- Values
- Order types
- Name
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.
Values: numerical – represents a percentage.
Default value: 0
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
DCA buy (when using HIGHBB option for DCA) | RT buyback |
RT sell | |
Close | |
Stop limit | |
Strategy buy |
Parameter name in config.js
: HIGH_BB
SMA Period
- Description
- Values
- Order types
- Name
This defines the number of periods used for calculating Bollinger Bands.
Values: numerical – represents a number of candlesticks.
Default value: 50
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
DCA buy (when using HIGHBB option for DCA) | RT sell |
Close | |
Stop limit |
Parameter name in config.js
: SMAPERIOD
Standard Deviation
- Description
- Values
- Order types
- Name
This value defines the multiplier used for calculating Bollinger Bands.
Values: numerical (recommended: between 1.9 and 2.1) - represents a multiplier value used in the bollinger bands calculation.
Default value: 2
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
DCA buy (when using HIGHBB option for DCA) | RT sell |
Close | |
Stop limit |
Parameter name in config.js
: STDV
Slow EMA
- Description
- Values
- Order types
- Name
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).
Values: numerical – represents a number of candlesticks.
Default value: 16
Affects | Does not affect |
---|---|
Strategy buy | RT buy |
RT buyback | |
RT sell | |
Close | |
Stop limit | |
Strategy sell | |
DCA buy |
Parameter name in config.js
: EMA1
Medium EMA
- Description
- Values
- Order types
- Name
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).
Values: numerical – represents a number of candlesticks.
Default value: 8
Affects | Does not affect |
---|---|
Strategy buy | RT buy |
RT buyback | |
RT sell | |
Close | |
Stop limit | |
Strategy sell | |
DCA buy |
Parameter name in config.js
: EMA2