The Bollinger Bands - Breakout Strategy is a trend-following optimized for short-term trading in the crypto market. This strategy employs the Bollinger Bands, a widely recognized technical indicator, as its primary instrument for pinpointing potential trades. It is capable of executing both long and short positions, depending on whether the market is in a spot or futures, and is particularly effective in trending markets.
The strategy boasts a high degree of configurability, allowing users to set the Bollinger Bands period and deviation, trend filter, volatility filter, trade direction filter, rate of change filter, and date filter. Furthermore, it offers options for Take Profit, Stop Loss, and Trailing Stop for both long and short positions, ensuring a comprehensive risk management approach. The inclusion of a maximum intraday loss feature adds another layer of protection, making this strategy a valuable tool for traders seeking a professional and adaptable trading system.
Name: Bollinger Bands - Breakout Strategy
Category: Trend Follower based on Bollinger Bands
Operating mode: Long and Short on Futures or Long on Spot
Trade duration: Intraday
Timeframe: 2H, 3H, 4H, 5H
Market: Crypto
Suggested usage: Trending Markets
Entry: When the price crosses above or below the Bollinger Bands
Exit: Opposite Cross or Profit target, Trailing stop or Stop loss
Configuration: - Bollinger Bands period and deviation - Trend Filter - Volatility Filter - Trade direction filter - Rate of Change filter - Date Filter (for backtesting purposes) - Take Profit, Stop Loss and Trailing Stop for long and short positions - Risk Management: Max Intraday Loss
Backtesting: ⁃ Exchange: BINANCE ⁃ Pair: BTCUSDT.P ⁃ Timeframe: 4H ⁃ Fee: 0.025% ⁃ Slippage: 1 - Initial Capital: 10000 USDT - Position sizing: 10% of Equity - Start : 2019-09-19 (Out Of Sample from 2022-12-23) - Bar magnifier: on
Credits: - LucF of Pine Coders for f_security function to avoid repainting using security. - QuantNomad for Monthly Table.
Disclaimer: Risk Management is crucial, so adjust stop loss to your comfort level. A tight stop loss can help minimise potential losses. Use at your own risk.
How you or we can improve? Source code is open so share your ideas! Leave a comment and smash the boost button!
Thanks for your attention, happy to support the TradingView community.
This is a really interesting strategy. Very nice work. I always thought Bollinger Bands were best used for finding pullbacks towards the mean, but you have proven otherwise! Bollinger bands can be profitable on breakouts as well. I need to study this to better understand the mechanism for taking profit. I notice it often takes profit near the extreme of a wick, but not right at the extreme, which would be a worrisome sign of repainting. Is it correct that no repainting occurs with this script? I see you have taken care to avoid repainting with the security function. Well done, and thank you!
xlzhdn
⋅
Hello. Thanks for sharing a good strategy. I'm testing this strategy at Binance (BTCUSDT.P , 1 min) for the checking repaints
The alerts and backtest results are different. 1. Alerts come, but backtests don't enter/exit(close), 2. In the backtest, it shows that it enter/exit(close), but no alerts came.
Is it because the timeframe is too low? Or is it repainting? (Above/Below on , Volatility filter is on, ROC filter is off)
Thank you
ks1267
⋅
This is another good work. Can I ask a question. In some tf, this strategy works very well in the backtesting. However when I change to backtesting for the Furture trade, the number of positions have been decreased from 60-70 positions to just less than 10 positions with bad win rate. I always thought that the same strategy will trigger the buy/sell position at exactly same time and same price on both spot and future. Do you know why they are different using this strategy?
idam92
⋅
Thanks this powerful strategy. The biggest strength of this trade is in the trailing stop. Learning to use trailing is a very useful thing. I will incorporate this into all my strategies in the future.
ThousandX_Trader
⋅
To follow up my last comment, I came back and had another look at this impressive script. The repainting worth noting has to do with the trailing take profits. After the initial alert sounds, the placement of the exit shifts in backtesting until the end of the candle, at which point the reported exit sits at a distance from the candle wick that is equal to the trailing stop offset. So, there is virtually always some extra percentage gain given to each position in backtesting, and the smaller the trailing offset, the steeper the equity curve, as reported exits fall closer to the candle extreme. I ran the script with Bar Magnifier on.
Still, a powerful scripts worth playing with and forward testing to work out the optimal trailing take profit offset!