This strategy generates trading signals based on Bollinger Bands and double moving averages, with trend filtering to target high win rate and good profit-loss ratio.
Use Bollinger Band upper, middle and lower bands for long/short signal generation. Sell when price touches upper band, buy when touches lower band.
Use 20-period medium-term and 60-period long-term moving averages to determine trend direction. Uptrend when short MA crosses above long MA, downtrend when crosses below.
Dynamically adjust stop loss position based on Bollinger Band width. When width greater than 0.5%, stop loss at lower band. When less than 0.5%, reduce stop loss to half lower band range.
Entry conditions: Breaking lower band as buy signal during uptrend. Breaking upper band as sell signal during downtrend.
Exit conditions: Take profit when touching upper band or short MA on longs. Take profit when touching lower band or short MA on shorts.
Stop loss conditions: Stop out when price breaks below lower band dynamic range on longs. Stop out when price breaks above upper band dynamic range on shorts.
Using double MAs to determine trend helps filter noise from non-trending or range-bound markets.
BB middle band provides support/resistance, upper/lower bands serve as dynamic stop loss levels to control risk.
Adjusting stop loss range based on BB width reduces chance of being stopped out while keeping stop reasonable.
Trading in direction of trend leads to higher win rate.
Double MAs can generate false breakouts frequently, missing trend turning points. Can shorten MA periods.
BBs can get whipsawed in choppy, non-trending markets. Can reduce trade frequency.
Stop loss near support/resistance levels prone to being taken out. Can allow wider stop loss range.
Unable to capitalize on short-term pullbacks effectively. Can shorten holding period.
Optimize MA periods to find best fit for market conditions.
Optimize BB multiplier parameter to balance stop loss being hit.
Add other indicators for multi-factor confirmation to improve signal quality.
Incorporate volume/momentum to confirm trend, avoid divergence.
Money management optimization e.g. fixed fractional, fixed stop loss to control single trade risk.
Price shock handling e.g. large overnight gaps.
This is an overall robust strategy using double MAs for trend direction and BBs for support/resistance and dynamic stops. Limitations exist like false trend signals and stops too close. Further optimizations can be made across MA system, stop loss strategy, money management etc. to increase robustness across various market conditions. Overall an excellent strategy for beginners with its high win rate, good risk-reward profile and simple yet effective logic.
/*backtest start: 2022-10-18 00:00:00 end: 2023-10-24 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=2 strategy(title="yuthavithi BB Scalper 2 strategy", overlay=true) len = input(20, minval=1, title="Length") multiplier = input(4, minval=1, title="multiplier") trendTimeFrame = input(60, minval=1, title="Trend Time Frame") useTrendFilter = input(true, type=bool, title = "Use Trend Filter") src = input(close, title="Source") out = sma(src, len) //plot(out, title="SMA", color=blue) stdOut = stdev(close, len) bbUpper = out + stdOut * multiplier bbLower = out - stdOut * multiplier bbUpper2 = out + stdOut * (multiplier / 2) bbLower2 = out - stdOut * (multiplier / 2) bbUpperX2 = out + stdOut * multiplier * 2 bbLowerX2 = out - stdOut * multiplier * 2 bbWidth = (bbUpper - bbLower) / out closeLongTerm = request.security(syminfo.tickerid, tostring(trendTimeFrame), close) smaLongTerm = request.security(syminfo.tickerid, tostring(trendTimeFrame), sma(close,20)) //plot(smaLongTerm, color=red) trendUp = useTrendFilter ? (closeLongTerm > smaLongTerm) : true trendDown = useTrendFilter? (closeLongTerm < smaLongTerm) : true bearish = ((cross(close,bbUpper2) == 1) or (cross(close,out) == 1)) and (close[1] > close) and trendDown bullish = ((cross(close,bbLower2) == 1) or (cross(close,out) == 1)) and (close[1] < close) and trendUp closeBuy = (high[1] > bbUpper[1]) and (close < bbUpper) and (close < open) and trendUp closeSell = (((low[1] < bbLower[1]) and (close > bbLower)) or ((low[2] < bbLower[2]) and (close[1] > bbLower[1]))) and (close > open) and trendDown cutLossBuy = iff(bbWidth > 0.005, (low < bbLower) and (low[1] > bbLower[1]) and trendUp, (low < bbLowerX2) and (low[1] > bbLowerX2[1]) and trendUp) cutLossSell = iff(bbWidth > 0.005, (high > bbUpper) and (high[1] < bbUpper[1]) and trendDown, (high > bbUpperX2) and (high[1] < bbUpperX2[1]) and trendDown) if (bullish) strategy.entry("Buy", strategy.long, comment="Buy") if (bearish) strategy.entry("Sell", strategy.short, comment="Sell") strategy.close("Buy", closeBuy or cutLossBuy) strategy.close("Sell", closeSell or cutLossSell)