
이 전략은 부린 밴드 (Bollinger Bands) 와 상대적으로 약한 지표 (RSI) 를 사용하여 거래 신호를 식별합니다. 가격이 부린 밴드를 뚫고 궤도에 오르거나 내리면 구매 또는 판매 신호가 발생하며 RSI가 초과 구매 수준보다 높거나 초과 판매 수준보다 낮습니다. 이 전략은 가격의 극단적인 변동을 포착하고 RSI를 사용하여 트렌드의 강도를 확인합니다.
브린띠 RSI 트레이딩 전략은 가격과 동력 지표를 결합하여 가격의 극단적인 변동이 있을 때 거래 신호를 생성한다. 이 전략의 장점은 논리적으로 명확하고 구현 및 최적화하기 쉽다는 것이다. 그러나, 전략의 성능은 파라미터 선택에 의존하며, 특정 시장 환경에서 더 많은 가짜 신호를 생성할 수 있다.
/*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")