This strategy uses Bollinger Bands (BB) and the Relative Strength Index (RSI) to identify trading signals. When the price breaks through the upper or lower Bollinger Band and the RSI is above the overbought level or below the oversold level, a buy or sell signal is generated. The strategy aims to capture extreme price movements and uses RSI to confirm the strength of the trend.
The Bollinger Bands RSI Trading Strategy generates trading signals by combining price and momentum indicators when prices experience extreme fluctuations. The strategy’s advantages lie in its clear logic and ease of implementation and optimization. However, the performance of the strategy depends on parameter selection and may generate many false signals in certain market environments. By optimizing parameters, introducing other indicators, and considering actual transaction costs, the robustness and profit potential of the strategy can be further improved.
/*backtest start: 2024-04-23 00:00:00 end: 2024-05-23 00:00:00 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("Bollinger Bands + RSI Strategy", overlay=true) // Bollinger Bands settings length = input.int(20, title="BB Length") src = close mult = input.float(2.0, title="BB Multiplier") basis = ta.sma(src, length) dev = mult * ta.stdev(src, length) upper = basis + dev lower = basis - dev // 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) // RSI settings rsiLength = input.int(14, title="RSI Length") rsiOverbought = input.int(70, title="RSI Overbought Level") rsiOversold = input.int(30, title="RSI Oversold Level") rsi = ta.rsi(close, rsiLength) // Buy and sell conditions buyCondition = (close < lower) and (rsi < rsiOversold) sellCondition = (close > upper) and (rsi > rsiOverbought) // Execute buy and sell orders if (buyCondition) strategy.entry("Buy", strategy.long) if (sellCondition) strategy.close("Buy")template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6