Type/to search

Bollinger Bands Breakout Quantitative Trading Strategy

Common strategy
Created: 2024-02-04 14:52:52
Last modified: 2 years ago
1
Follow
1802
Followers

img

Overview

This strategy calculates the upper band, middle band and lower band of Bollinger Bands and combines the closing price of K-line to implement Bollinger Bands breakout trading strategy. It goes long when price breaks through the upper band and goes short when price breaks through the lower band. Stop loss and take profit prices are also set.

Strategy Principle

  1. Calculate the middle band SMA of Bollinger Bands with period 60, representing the middle band of price trend.

  2. Calculate the upper band and lower band of Bollinger Bands. The upper band is middle band + 2 times standard deviation and the lower band is middle band - 2 times standard deviation. The band width is controlled by multiplier.

  3. When closing price is greater than the upper band, go long. When closing price is less than the lower band, go short.

  4. Set stop loss and take profit mechanism. The stop loss percentage is 1.5% and take profit percentage is 6%.

  5. When price re-enters the Bollinger Bands or reaches stop loss/take profit price, close position.

Advantage Analysis

  1. Bollinger Bands indicator has strong ability of trend judgment by breakout.

  2. Simple strategy logic and easy to understand and implement.

  3. Stop loss and take profit control risks.

Risk Analysis

  1. Bollinger Bands breakout cannot accurately determine price trend reversal points, with the risk of false breakout.

  2. Unreasonable stop loss and take profit settings may bring greater risks.

  3. High trading frequency may be affected by transaction costs.

Optimization Directions

  1. Combine with other indicators to filter out false signals, e.g. KDJ for trend and MACD for divergence.

  2. Dynamically adjust Bollinger Bands parameters based on market volatility to calculate reasonable band width.

  3. Optimize stop loss and take profit strategy, e.g. trailing stop or partial closing.

  4. Consider transaction costs' impact and adjust holding period.

Conclusion

This strategy follows trend by Bollinger Bands breakout and has some positive effects. But false breakout may bring greater risks. Combining with other indicators and keep optimizing parameters can control risks and improve profitability.

Source
Pine
/*backtest
start: 2024-01-04 00:00:00
end: 2024-02-03 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Fuera Bolinga", overlay=true)

length = input.int(60, minval=1)
Strategy parameters
Strategy parameters
length
mult
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)