Bollinger Bands TA

boekenbox edited this page Nov 15, 2018 · 12 revisions

Bollinger Bands (TA)

Info on Bollinger Bands

Bollinger Bands indicate relative high and low prices, using this information you can buy relatively low and sell relatively high.

With this strategy you can configure at which percentage from the lower Bollinger Band Gunbot should buy, and at which percentage from the upper Bollinger Band a sell order should be placed. Orders are placed after prices first move outside the set level, then move back in.

Some extra features are available for users of Gunbot Standard edition and higher. These are marked below.

Warning: Gain protection is optional for this strategy. Be aware that this can lead to sell orders below your break-even point.

Contents:

  1. Trading example
  2. How to work with this strategy
  3. Strategy parameters
  4. Buy settings
  5. Sell settings
  6. Balance settings
  7. Indicator settings
  8. Dollar cost avg settings
  9. Reversal trading settings
  10. TrailMe settings
  11. Misc settings
  12. Placeholders

Trading example

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

How to work with this strategy

The infographic below describes what triggers trades with this strategy.

bollinger-bands-ta

Strategy parameters

Following settings options are available for BBTA and can be set in the strategy configurator of the GUI or the strategies section of the config.js file.

These settings are global and apply to all pairs running this strategy. When you want a specific parameter to be different for one or more pairs, use an override at the pair level.

Using the BUY_METHOD and SELL_METHOD parameters you can combine different methods for buying and selling. This strategy page assumes both BUY_METHOD and SELL_METHOD are set to BBTA. Accepted values are all strategy names as listed here.

Buy settings

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

Parameter Default value Description
BUY_ENABLED
true Values: true or false.


Set this to false to prevent Gunbot from placing buy orders. Affects all types of buy orders.

NBA
0 Values: numerical, represents a percentage


"Never Buy Above". Use this to only allow buy orders below the last sell rate. This sets minimum percentage difference between the last sell order and the next buy. The default setting of 0 disables this option.

When set to 1, Gunbot will only place a buy order when the strategy buy criteria meet and price is at least 1% below the last sell price.

TAKE_BUY
false Values: true or false.


With this setting enabled, Gunbot will try to take any buy chance between the strategy entry point and your setting for TBUY_RANGE.

As soon as the ask price drops below the upper border of this range (called "Take Buy"), it will trail down with a range of TBUY_RANGE and place a buy order as soon as the ask price crosses up "Take Buy". Confirming indicators in use are respected.

Normal strategy buy orders are still possible while using TAKE_BUY.

This option should not be used together with reversal trading.

TBUY_RANGE
0.5 Values: numerical – represents a percentage.


This sets the buy range for TAKE_BUY.

When set to 0.5, the initial trailing stop is set 0.5% above the entry point defined by BUY_LEVEL.

BUY_LEVEL
1 Values: numerical – represent a percentage.


This sets entry point for TAKE_BUY 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 BBTA as sell method.

Parameter Default value Description
SELL_ENABLED
true Values: true or false.


Set this to false to prevent Gunbot from placing sell orders. Affects all types of sell orders.

TAKE_PROFIT
false Values: true or false.


With this setting enabled, Gunbot will try to take any possible profit between the break-even point and your strategy exit point. This can be useful, for example, on days where the markets move very slowly.

It works by trailing prices upwards between the break-even point and the strategy exit point, with a configurable range for trailing: TP_RANGE. A sell order will be placed when the trailing stop limit is hit or strategy sell conditions are reached. Confirming indicators in use are respected.

Sells at minimal loss are possible when using TAKE_PROFIT, acting as a sort of mini stop loss.

This option should not be used together with reversal trading.

TP_RANGE
0.5 Values: numerical – represents a percentage.


This sets the sell range for TAKE_PROFIT.

When set to 0.5, the initial trailing stop is set 0.5% below the break-even point.

TP_PROFIT_ONLY
false Values: true or false.


Enable this to only allow sell orders above the break-even point.

DOUBLE_CHECK_GAIN
true Values: true or false.


Disable this to allow sell orders below the break-even point.

GAIN
0.5 Values: numerical - represents a percentage.


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

Balance settings

Go to balance settings

Indicator settings

Relevant indicators for trading with BBTA

These settings have a direct effect on trading with BBTA, this is where you configure how Bollinger Bands are calculated and at which distance from them orders should be placed. Additionally, BUY_LEVEL is dependant on EMA.

Parameter Default value Description
PERIOD
15 Values: numerical– represents candlestick size in minutes.


This sets the candlestick period used for trading, this affects all indicators within the strategy and the BUY_LEVEL. Only use supported values.

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

LOW_BB
0 Values: numerical – represent a percentage.


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. Additionally, the price must be below the entry point as defined by BUY_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.

HIGH_BB
0 Values: numerical – represent a percentage.


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.

SMAPERIOD
50 Values: numerical – represents a number of candlesticks.


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

STDV
2 Values: numerical (recommended: between 1.9 and 2.1) - represents a multiplier value used in the bollinger bands calculation.


This value defines the multiplier used for calculating Bollinger Bands.

EMA1
16 Values: numerical – represents a number of candlesticks.


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).

EMA2
8 Values: numerical – represents a number of candlesticks.


Set this to the amount of candlesticks you want to use for your fast 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 fast EMA – you need to set EMA2 to 12 (12 * 5 mins).

Confirming indicators + advanced indicator settings

This is not available for Gunbot Starter.

Go to confirming indicators

Dollar cost avg settings

Go to Dollar cost avg (DCA)

Reversal trading settings

Go to reversal trading

TrailMe settings

This is not available for Gunbot Starter.

Parameters to configure additional trailing for various types of orders. Trailing works just like it does for the TSSL strategy, the difference being the starting point of trailing.

Orders resulting from trailing are only placed when the main strategy criteria are met, and confirming indicators (if any) allow the order. All these conditions must occur in the same cycle.

Because this strategy trades on crosses happening in a single cycle, it is not recommended to use additional trailing for normal buy and sell orders. Trades will only happen when both the trailing stop and strategy cross happen in the same round.

Go to Trailme

Misc settings

Go to misc settings

Placeholders

The following parameters in config.js have no function for this strategy and act as placeholder.

Parameter Description
ATRX Placeholder.
ATR_PERIOD Placeholder.
BUYLVL1 Placeholder.
BUYLVL2 Placeholder.
BUYLVL3 Placeholder.
BUYLVL Placeholder.
BUY_RANGE Placeholder.
DISPLACEMENT Placeholder.
FAST_SMA Placeholder.
KIJUN_PERIOD Placeholder.
KUMO_SENTIMENTS Placeholder.
MACD_LONG Placeholder.
MACD_SHORT Placeholder.
MACD_SIGNAL Placeholder.
PP_BUY Placeholder.
PP_SELL Placeholder.
SELLLVL1 Placeholder.
SELLLVL2 Placeholder.
SELLLVL3 Placeholder.
SELLLVL Placeholder.
SELL_RANGE Placeholder.
SENKOUSPAN_PERIOD Placeholder.
SLOW_SMA Placeholder.
TENKAN_PERIOD Placeholder.
TSSL_TARGET_ONLY Placeholder.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.