Gunbot wiki
Wiki em português
English
English
  • Welcome to the Gunbot wiki
  • About
    • What's new?
      • New in v22
      • New in v20
      • New in v18
      • New in v16.7+
      • New in v16
      • New in v15
      • New in v13 / v14
      • New in v12
      • New in v11
      • New in v10
      • New in v9
      • New in v8
      • New in v7
      • New in v6
    • Supported exchanges
      • Creating API keys
      • Websockets support
    • License info & system specs
      • How to create a wallet
    • Purchasing Gunbot
  • Setup & general settings
    • Installation & startup
      • Quickstart guide
      • Download software
      • Windows installation
      • macOS installation
      • Linux installation
      • ARM installation
      • How to enable SSL/TLS
      • Running multiple instances
      • Headless mode
    • Global settings
      • Import settings
      • Bot settings
      • Cancel orders
      • Advanced
    • Profile settings
      • Exchanges
      • Gunthy wallet
      • Edit license
      • GUI authentication
      • Telegram
      • Tournament
  • How to work with Gunbot
    • Learning the basics
      • Trading logic
      • Important settings
      • Order types
      • Period
      • Trailing
      • ROE trailing
    • Strategies & pairs
      • Easy edit
      • Strategy editor
      • Trading pairs
        • Pair processing
    • Chart & results
    • Extra modules
      • AutoConfig
      • Backtesting
      • Code editor
      • TradingView Alerts
        • IMAP listener
      • Alerts (beta)
  • Trading strategy options
    • About Gunbot strategies
      • Trading methods
      • Protections
    • Regular strategies (spot trading)
      • ADX
      • ATRTS
      • Bollinger Bands
      • Bollinger Bands (TA)
      • EMA spread
      • Emotionless
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • Spotgrid
      • Spotgrid Advanced
      • StepGrid
      • SMA cross
      • Support / Resistance
      • Tssl (trailing stop / stop limit)
      • Time series analysis
    • Margin trading strategies
      • ADX
      • ATRTS
      • Bollinger Bands
      • Bollinger Bands (TA)
      • EMA spread
      • Futures Grid
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • SMA cross
      • Tenkan
      • Tssl (trailing stop / stop limit)
      • Time series analysis
    • Custom strategies
    • Balance settings
    • Confirming indicators
    • Dollar Cost Avg (DCA)
    • Reversal trading (RT)
    • TrailMe
    • Misc settings
  • More
    • Config marketplace
  • Various
    • Backups
    • Logs
    • Handling bags
    • Acronyms
  • Troubleshooting
    • Critical errors
    • Bot does not trade
    • Reset password
Powered by GitBook
On this page
  • Trading example
  • How to work with this strategy
  • Strategy parameters
  • Buy settings
  • Buy enabled
  • Buy Level
  • NBA
  • Take Buy
  • TBuy Range
  • Sell settings
  • Sell enabled
  • Gain
  • Take Profit
  • TP Range
  • TP Profit Only
  • Double Check Gain
  • Indicator settings
  • Period
  • Low BB
  • High BB
  • SMA Period
  • Standard Deviation
  • Slow EMA
  • Medium EMA
  • TrailMe settings
  • Balance settings
  • Confirming indicator + advanced indicator settings
  • Dollar cost avg settings
  • Reversal trading settings
  • Misc settings
  • Placeholders

Was this helpful?

  1. Trading strategy options
  2. Regular strategies (spot trading)

Bollinger Bands

PreviousATRTSNextBollinger Bands (TA)

Last updated 4 years ago

Was this helpful?

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 as soon as price meets the set distance from the Bollinger Bands.

Trading example

How to work with this strategy

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.

__

Strategy parameters

Following settings options are available for bb 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.

__

Buy settings

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

Buy enabled

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

This sets the target for buying at a percentage below the lowest EMA. Additionally price must reach LOW_BB.

When you set this to 1, buy orders will only be placed when the current price is at least 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

NBA

"Never Buy Above". Use this to only allow buy orders below the last sell rate.

This sets the 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.

Values: numerical, represents a percentage.

Default value: 0

Affects

Does not affect

Strategy buy

Strategy sell

Stop limit

Close

RT sell

DCA buy

RT buy

RT buyback

Parameter name in config.js: NBA

Take Buy

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.

Values: true or false

Default value: false

Affects

Does not affect

Strategy buy

Strategy sell

Stop limit

Close

RT sell

DCA buy

RT buy

RT buyback

Parameter name in config.js: TAKE_BUY

TBuy Range

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.

Values: numerical, represents a percentage.

Default value: 0.5

Affects

Does not affect

Strategy buy

Strategy sell

Stop limit

Close

RT sell

DCA buy

RT buy

RT buyback

Parameter name in config.js: TBUY_RANGE

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.

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

This sets the minimum target for selling. Gunbot will sell once price reaches the set percentage above the break-even point. and HIGH_BB is reached.

If you want to have at least 2% profit per trade, set this to 2.

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

Take Profit

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 or DOUBLE_CHECK_GAIN

Values: true or false

Default value: false

Affects

Does not affect

Strategy sell

Strategy buy

RT buy

RT buyback

RT sell

Close

DCA buy

Stop limit

Parameter name in config.js: TAKE_PROFIT

TP Range

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.

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: TP_RANGE

TP Profit Only

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

Values: true or false

Default value: false

Affects

Does not affect

Strategy sell

Strategy buy

RT buy

RT buyback

RT sell

Close

DCA buy

Stop limit

Parameter name in config.js: TP_PROFIT_ONLY

Double Check Gain

This is an extra check that looks at your recent trading history to verify GAIN will be reached before placing a sell order.

Values: true or false

Default value: true

Affects

Does not affect

Strategy sell

Strategy buy

RT buy

RT buyback

RT sell

Close

DCA buy

Stop limit

Parameter name in config.js: DOUBLE_CHECK_GAIN

Indicator settings

Relevant indicators for trading with bb.

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.

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

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

The bot will buy when price hits the set percentage from the lower Bollinger Band and the price is 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. Negative values are allowed.

Values: numerical – represent 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

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

The bot will sell when price hits the set percentage from the upper Bollinger Band and GAIN is reached.

When set to 0, the upper Bollinger Band is the target (well, almost). 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 – represent 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

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

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

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

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

TrailMe settings

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.

Balance settings

Confirming indicator + advanced indicator settings

Dollar cost avg settings

Reversal trading settings

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.

ICHIMOKU_PROTECTION

Placeholder

KIJUN_CLOSE

Placeholder.

KIJUN_PERIOD

Placeholder.

KIJUN_STOP

Placeholder.

KUMO_CLOSE

Placeholder.

KUMO_SENTIMENTS

Placeholder.

KUMO_STOP

Placeholder.

LEVERAGE

Placeholder.

LONG_LEVEL

Placeholder.

MACD_LONG

Placeholder.

MACD_SHORT

Placeholder.

MACD_SIGNAL

Placeholder.

MAKER_FEES

Placeholder.

MEAN_REVERSION

Placeholder.

PP_BUY

Placeholder.

PP_SELL

Placeholder.

PRE_ORDER_GAP

Placeholder.

PRE_ORDER

Placeholder.

RENKO_ATR

Placeholder.

RENKO_BRICK_SIZE

Placeholder.

RENKO_PERIOD

Placeholder.

ROE_CLOSE

Placeholder.

ROE_LIMIT

Placeholder.

ROE_TRAILING

Placeholder.

ROE

Placeholder.

SELLLVL1

Placeholder.

SELLLVL2

Placeholder.

SELLLVL3

Placeholder.

SELLLVL

Placeholder.

SELL_RANGE

Placeholder.

SENKOUSPAN_PERIOD

Placeholder.

SHORT_LEVEL

Placeholder.

SLOW_SMA

Placeholder.

TENKAN_CLOSE

Placeholder.

TENKAN_PERIOD

Placeholder.

TENKAN_STOP

Placeholder.

TSSL_TARGET_ONLY

Placeholder.

USE_RENKO

Placeholder.

Example of how trading with this strategy can perform. .

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 bb. Accepted values are all strategy names as listed .

Only use .

Details and settings
here
TrailMe
Balance settings
Confirming indicators
Dollar Cost Avg (DCA)
Reversal trading (RT)
Misc settings
supported values
Bollinger Bands