Skip to main content

Bollinger Bands Bot

Use this bot to automatically trade based on Bollinger Bands technical indicator, entering positions when price moves outside the bands ...

Updated over 2 weeks ago

Overview

The Bollinger Bands Trading bot uses a popular technical indicator that consists of a simple moving average (middle band) and two standard deviation bands above and below it. The bot enters positions when price moves below the lower band (oversold condition) and exits based on either the upper band or your specified profit/loss targets.

The strategy is particularly effective in ranging markets where price tends to oscillate between overbought and oversold conditions.

Details

Bollinger Bands consist of three lines:

  • Middle Band: A simple moving average (SMA)

  • Upper Band: SMA + (Standard Deviation Γ— Multiplier)

  • Lower Band: SMA - (Standard Deviation Γ— Multiplier)

The bot's trading logic:

  1. Entry: Buy when price moves below the lower band (oversold condition)

  1. Exit: Two available strategies:

  • Indicator-based: Sell when price crosses above the upper band

  • Target-based: Sell when either profit target or stop loss is hit

How to Configure the Bot

General Settings

  • Exchange Platform: Select your preferred exchange

  • Trading Account: Choose the account for bot operations

  • Market: Select the trading pair (e.g. BTC/USDT)

  • Starting Capital: Amount of quote currency to allocate to the bot

  • This amount is used for initial purchases

  • Profits are automatically reinvested in subsequent trades

Strategy Settings

  • Candle Timeframe: Chart interval for analysis

  • Options: 1m, 5m, 15m, 1h, 4h, 1d

  • Lower timeframes = more frequent trades

  • Higher timeframes = fewer but potentially higher-quality signals

  • Moving Average Period: Number of candles for calculating the bands

  • Higher values create smoother, slower-moving bands

  • Lower values create more responsive, faster-moving bands

  • Default: 10 periods

  • Band Std Dev Multiplier: Controls band width

  • Higher values = wider bands, fewer signals

  • Lower values = tighter bands, more signals

  • Default: 0.8

  • Exit Strategy: Choose between:

  • Profit Target or Stop Loss: Exit at specified profit/loss levels

  • Indicator Confirmation: Exit when price crosses upper band

  • Cooldown Period: Number of candles to wait after closing a position

  • Helps avoid immediate re-entry in volatile conditions

  • Set to 0 for no delay between trades

Profit & Risk Management

(Only visible when using "Profit Target or Stop Loss" exit strategy)

  • Profit Target: Percentage gain to trigger position close

  • Example: 1% = close when profit reaches 1%

  • Can set values above 100% for longer-term trades

  • Stop Loss: Percentage loss to trigger position close

  • Example: 1% = close when loss reaches 1%

  • Set to 100% to effectively disable stop loss

Frequently Asked Questions

How does the bot calculate entry points?

The bot monitors price action relative to the Bollinger Bands. When price moves below the lower band, it's considered oversold and triggers a buy signal. The bot uses your entire available capital (accounting for fees) to enter positions.

Which exit strategy should I choose?

  • Indicator Confirmation: Better for ranging markets where price regularly oscillates between bands

  • More natural exits based on market conditions

  • May capture larger moves

  • No fixed profit target

  • Profit Target or Stop Loss: Better for more controlled risk management

  • Fixed profit targets ensure consistent gains

  • Stop losses protect capital

  • More predictable trading behavior

How should I set the Moving Average Period?

  • Shorter periods (5-10): More signals, better for volatile markets

  • Medium periods (20-50): Balanced approach, standard for most markets

  • Longer periods (50+): Fewer signals, better for trending markets

What Band Multiplier should I use?

  • Standard setting is 2.0 (traditional Bollinger Bands)

  • Lower values (0.5-1.5): More trading signals

  • Higher values (2.0-3.0): Fewer, potentially higher-quality signals

  • Default of 0.8 provides more frequent signals

How does the Cooldown Period work?

After closing a position, the bot will wait for the specified number of candles before taking new trades. For example:

  • With 5-minute candles and cooldown of 12:

  • Bot will wait 1 hour after each trade

  • Set to 0 for continuous trading

  • Higher values help avoid choppy market conditions

What happens to profits?

The bot automatically reinvests profits in subsequent trades. The available capital is updated after each trade to include any gains or losses, allowing the bot to compound returns over time.

Remember that Bollinger Bands work best in ranging markets where price tends to oscillate between overbought and oversold conditions. Consider using longer timeframes and appropriate band settings in trending markets to avoid false signals.

Did this answer your question?