
This strategy is a dynamic range trading system combining Bollinger Bands and Relative Strength Index (RSI). It captures market turning points by monitoring price crossovers with Bollinger Bands and RSI overbought/oversold levels. The core idea is to seek rebound opportunities in oversold markets and take profits in overbought conditions.
The strategy employs 20-period Bollinger Bands and 14-period RSI as core technical indicators. Bollinger Bands consist of three lines: middle band (20-period SMA), upper band (middle + 2SD), and lower band (middle - 2SD). Buy signals are triggered when two conditions are met simultaneously: price crosses above the lower band and RSI is below 45 (1.5 times the standard 30). Sell signals occur when price crosses below the upper band and RSI is above 70. This design considers both price trends and momentum indicators, effectively reducing false breakout risks.
Sideways Market Risk: May generate frequent false breakout signals in ranging markets. Suggestion: Add trend filters to only trade in clear trends.
Lag Risk: Moving average calculations may affect signal timeliness. Suggestion: Consider using shorter-period indicators for confirmation.
Over-optimization Risk: Parameter optimization may lead to overfitting historical data. Suggestion: Test thoroughly across different timeframes and market conditions.
Add Trend Filters: Introduce ADX or long-term moving averages to assess trend strength and only trade in clear trends.
Optimize Stop Loss Settings: Implement dynamic stop-loss placement based on ATR for more flexible risk control.
Incorporate Volume Confirmation: Add volume analysis requiring increased volume on breakouts for improved signal reliability.
Enhanced Position Management: Automatically adjust position sizes based on market volatility and account risk levels.
This mature strategy combines classic technical analysis indicators, using Bollinger Bands and RSI to capture major trends while controlling risks. The strategy design is clear, implementation is concise, and it demonstrates good practicality. While inherent risks exist, a robust trading system can be built through appropriate parameter settings and risk management measures. Traders are advised to thoroughly test and optimize according to specific market characteristics before live trading.
/*backtest
start: 2024-02-21 00:00:00
end: 2025-02-19 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"DOGE_USDT"}]
*/
//@version=5
strategy("Bollinger Bands + RSI Strategy", overlay=true)
// Bollinger Bands Parameters
length = input.int(20, title="Bollinger Length")
src = close
mult = input.float(2.0, title="Bollinger Multiplier")
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upper = basis + dev
lower = basis - dev
// RSI Parameters
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level", minval=50)
rsiOversold = input.int(30, title="RSI Oversold Level", maxval=50)
rsiValue = ta.rsi(src, rsiLength)
// Buy and Sell Conditions
buyCondition = ta.crossover(src, lower) and rsiValue < 1.5 * rsiOversold
sellCondition = ta.crossunder(src, upper) and rsiValue > rsiOverbought
// Plot Bollinger Bands
plot(basis, color=color.blue, title="Basis")
p1 = plot(upper, color=color.red, title="Upper Band")
p2 = plot(lower, color=color.green, title="Lower Band")
fill(p1, p2, color=color.gray, transp=90)
// Plot RSI
//hline(rsiOverbought, "Overbought", color=color.red)
//hline(rsiOversold, "Oversold", color=color.green)
// Execute Orders
if (buyCondition)
strategy.entry("Buy", strategy.long)
if (sellCondition)
strategy.close("Buy")
// Display signals on the chart
plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")