
이 전략은 부린 밴드 (Bollinger Bands) 와 상대적으로 약한 지표 (RSI) 를 결합한 기술 분석 거래 시스템이다. 그것은 주로 가격 변동과 시장 동력의 특성을 활용하여 오버 바이 오버 셀 영역에서 거래 기회를 찾는다. 이 전략은 RSI 지표가 오버 바이 (Bollinger Bands) 를 표시하고 오버 세일 영역을 넘어가는 경우 구매 신호를 발생시킨다.
전략의 핵심 논리는 다음과 같은 핵심 요소에 기초합니다.
이 전략은 브린띠와 RSI 지표를 결합하여 비교적 완전한 거래 시스템을 구축한다. 전략의 논리는 명확하고, 위험 통제는 합리적이며, 실용적인 가치가 있다. 제안된 최적화 방향에 의해, 전략에는 더 이상의 향상시킬 여지가 있다. 실제 적용에서, 투자자는 자신의 위험 용량과 시장 환경에 따라 적절한 조정을 하도록 권장한다.
/*backtest
start: 2024-07-15 00:00:00
end: 2025-02-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BNB_USDT"}]
*/
//@version=5
strategy("Bollinger Bands + RSI Strategy", overlay=true)
// Bollinger Bands parameters
length = input.int(20, title="Bollinger Bands Length")
src = input(close, title="Source")
mult = input.float(2.0, title="Bollinger Bands Multiplier")
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upper_band = basis + dev
lower_band = basis - dev
// RSI parameters
rsi_length = input.int(14, title="RSI Length")
rsi = ta.rsi(src, rsi_length)
// Plot Bollinger Bands
plot(upper_band, color=color.red, linewidth=2, title="Upper Bollinger Band")
plot(lower_band, color=color.green, linewidth=2, title="Lower Bollinger Band")
plot(basis, color=color.blue, linewidth=1, title="Middle Band")
// Buy Condition
buy_condition = ta.crossover(close, lower_band) and rsi < 30
if buy_condition
strategy.entry("Buy", strategy.long)
// Sell Condition
sell_condition = ta.crossunder(close, upper_band) and rsi > 70
if sell_condition
strategy.entry("Sell", strategy.short)
// Exit Conditions (optional: use the middle Bollinger Band for exits)
exit_condition = ta.cross(close, basis)
if exit_condition
strategy.close("Buy")
strategy.close("Sell")
// Optional: Plot RSI for additional insight
hline(70, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)
plot(rsi, color=color.purple, title="RSI", linewidth=1, offset=-5)