Type/to search

Double Bollinger Bands Breakout Strategy

Cryptocurrency
Created: 2023-12-13 17:33:24
Last modified: 2 years ago
1
Follow
1779
Followers

img

Overview

This strategy uses double Bollinger Bands to identify consolidation zones and breakout signals to implement low-buy-high-sell trading strategy. When price breaks through the neutral zone, it signals the start of a new trend and time to enter long position. When price breaks back below the neutral zone, it signals the end of the trend and time to close position.

Strategy Logic

The strategy employs two Bollinger Bands. The inner BB has upper/lower bands of 20SMA ± 1 standard deviation. The outer BB has upper/lower bands of 20SMA ± 2 standard deviations. The area between the two BBs is defined as the neutral zone.

When price stays inside the neutral zone for two consecutive candles, it is considered consolidation. When price closes above the upper band of the inner BB after two consecutive neutral zone candles, a long signal is generated.

After entering long, stop loss is set at lowest price - 2xATR to lock in profit and control risk. Position is closed when price breaks back below the upper band of the inner BB.

Advantage Analysis

This strategy combines indicators and trend to identify consolidation zones and determine trend start, allowing low-buy-high-sell trading with large profit potential. The stop loss strategy locks in profit and enhances stability.

Risk Analysis

The strategy relies on breakout signals which can turn out to be false breakouts, resulting in losing trades. Also, stops being too tight may risk premature liquidation.

Solutions include optimizing BB parameters, adding filters to reduce false signals, and allowing wider stops.

Optimization Directions

  1. Optimize BB parameters to reduce false breakouts
  2. Add other filters e.g. volume to avoid low-volume false breaks
  3. Adjust stop loss strategy to prevent whipsaws and early stops
  4. Scale in positions to reduce single-trade risks

Conclusion

This strategy integrates double BBs and trend strategies for low-buy-high-sell trading with large profit potential. The stop loss strategy also enhances stability. Further optimizations can improve strategy performance for live trading.

Source
Pine
/*backtest
start: 2022-12-06 00:00:00
end: 2023-12-12 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © DojiEmoji

//@version=4
Strategy parameters
Strategy parameters
Backtest Start Time
Define backtest end-time (If false, will test up to most recent candle)
Backtest End Time (if checked above)
Length of ATR for trailing stop loss
ATR Multiplier for trailing stop loss
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)