BBTA (Bollinger Bands Technical Analysis)
Bollinger Bands help identify relative highs and lows. BBTA uses those levels for re-entry signals.
Bollinger Bands consist of a middle band being an N-period simple moving average (SMA), an upper band at K standard deviations above the middle band, and a lower band at K standard deviations below the middle band. They adapt to market volatility, widening when volatility is high and narrowing when it's low.
The indicator uses a simple moving average as the middle line, with upper and lower bands set at a standard deviation distance. Wider bands indicate higher volatility.
To use BBTA in Gunbot, configure the percentage from the lower band to buy and the percentage from the upper band to sell. Orders are placed after price moves outside the set level and then re-enters.
How to Work With It
Buy Method Conditions
A buy order is allowed when price moves below the lower band and then moves back inside it.
Sell Method Conditions
A sell order is allowed when price moves above the upper band and then moves back inside it.
Gain protection is optional for this strategy. Disabling it can lead to sell orders below your break-even point.
Trading Example

Example of how trading with this strategy can perform. See details and settings on TradingView.
The infographic below describes what triggers trades with this strategy.

BBTA Strategy Settings
Buy Settings
| Label | Config Parameter | Default Value | Detailed Description |
|---|---|---|---|
| Buy Enabled | BUY_ENABLED | true | When enabled, this setting allows the strategy to execute buy or long orders. |
| Low BB | LOW_BB | 0.1 | This setting specifies the target for the lower Bollinger Band. The value is a percentage, ranging from 0 to 100, representing the position from the bottom to the top of the band. |
Sell Settings
| Label | Config Parameter | Default Value | Detailed Description |
|---|---|---|---|
| Sell Enabled | SELL_ENABLED | true | When enabled, this setting allows the strategy to execute sell or short orders. |
| High BB | HIGH_BB | 0.1 | This setting specifies the target for the upper Bollinger Band. The value is a percentage, ranging from 0 to 100, representing the position from the top to the bottom of the band. |
| Double Check Gain | DOUBLE_CHECK_GAIN | true | This setting ensures that a positive gain is reached before allowing a sell order. Disable this to allow indicators to initiate a sell even at a potential loss. |
| Gain | GAIN | 1 | This setting determines the gain target above the break-even point for a trade. The value is a percentage, indicating how much gain is targeted. |
| Count Sell | COUNT_SELL | 9999 | This setting limits the number of sell orders for a trading pair after it has been added. It disables the pair after reaching the specified number of sell orders. |
Indicators
| Label | Config Parameter | Default Value | Detailed Description |
|---|---|---|---|
| Period | PERIOD | 15 | The period setting determines the "size" of the candlesticks used for calculating various indicators. Ensure that the value you choose is supported by your exchange. The value represents the time in minutes. |
| SMA Period | SMAPERIOD | 30 | This setting specifies the number of candles used to calculate the Simple Moving Average, Bollinger Bands, and other indicators. It provides a basis for trend analysis and other technical assessments. |
| Standard Deviation | STDV | 2 | This setting is used as a multiplier to calculate the width of Bollinger Bands. Adjusting this value changes the sensitivity of the band boundaries to price movements. |
Overview of Effects on Different Order Types
| Config Parameter | Affected Order Types | Not Affected Order Types |
|---|---|---|
| Buy Enabled | Strategy buy, DCA buy, RT buy, RT buyback | Strategy sell, Stop limit, Close, RT sell |
| Buy Level | Strategy buy | Strategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback |
| Sell Enabled | Strategy sell, Stop limit, RT sell | Strategy buy, RT buy, RT buyback, Close, DCA buy |
| Gain | Strategy sell | Strategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit |
| Period | Strategy sell, Strategy buy, DCA buy (when using an indicator) | RT buy, RT buyback, RT sell, Close, Stop limit |
| Low BB | Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy |
| High BB | Strategy sell, DCA buy (when using HIGHBB option) | RT buy, RT buyback, RT sell, Close, Stop limit, Strategy buy |
| SMA Period | Strategy sell, Strategy buy, DCA buy (when using HIGHBB option) | RT buy, RT buyback, RT sell, Close, Stop limit |
| Standard Deviation | Strategy sell, Strategy buy, DCA buy (when using HIGHBB option) | RT buy, RT buyback, RT sell, Close, Stop limit |
| Slow EMA | Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy |
| Medium EMA | Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, Strategy sell, DCA buy |