
이 전략은 상대적으로 약한 지표 ((RSI) 와 부린 밴드 ((BB) 를 결합한 고급 기술 분석 거래 시스템입니다. 이 두 지표를 연동하여 시장의 과매매 과매매 영역에서 높은 확률의 역전 거래 기회를 찾습니다. 이 전략은 20주기 이동 평균을 부린 밴드의 기준으로 삼고 표준 차이의 2배로 경로를 설정하고 14주기 RSI를 사용하여 동력을 분석합니다. RSI가 30/70을 돌파하고 가격이 부린 밴드 경계에 도달하면 거래 신호를 발생시킵니다.
전략의 핵심 논리는 두 가지 주요 기술 지표의 상호 작용에 기반합니다.
이 전략은 RSI와 브린띠의 연동 작용을 통해 완전한 거래 시스템을 구축한다. 그것은 명확한 입출입 신호를 제공할 뿐만 아니라, 좋은 위험 제어 장치도 갖추고 있다. 일부 고유한 위험이 존재하지만, 지속적인 최적화 및 개선으로 전략은 다양한 시장 환경에서 안정적인 성능을 유지할 것으로 예상된다. 전략의 모듈화 설계는 또한 미래의 최적화 및 확장을위한 좋은 토대를 제공합니다.
/*backtest
start: 2024-10-31 00:00:00
end: 2025-02-18 08:00:00
period: 30m
basePeriod: 30m
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("RSI + Bollinger Bands Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Bollinger Bands Settings
bbLength = input.int(20, title="BB Length")
bbStdDev = input.float(2.0, title="BB Standard Deviation")
basis = ta.sma(close, bbLength)
dev = bbStdDev * ta.stdev(close, bbLength)
upperBB = basis + dev
lowerBB = basis - dev
// Plot Bollinger Bands
plot(basis, color=color.orange, title="BB Basis")
plot(upperBB, color=color.blue, title="Upper Bollinger Band")
plot(lowerBB, color=color.blue, title="Lower Bollinger Band")
fill(plot(upperBB), plot(lowerBB), color=color.blue, transp=90, title="BB Fill")
// 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)
// Plot RSI on separate pane
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsi, color=color.purple, title="RSI", linewidth=2, display=display.none) // Hidden on main chart
// Long Condition: RSI crosses above oversold and price touches lower BB
longCondition = ta.crossover(rsi, rsiOversold) and close <= lowerBB
if (longCondition)
strategy.entry("Long", strategy.long)
// Short Condition: RSI crosses below overbought and price touches upper BB
shortCondition = ta.crossunder(rsi, rsiOverbought) and close >= upperBB
if (shortCondition)
strategy.entry("Short", strategy.short)
// Exit Long: RSI crosses above overbought or price crosses above basis
exitLong = ta.crossunder(rsi, rsiOverbought) or close >= basis
if (exitLong)
strategy.close("Long")
// Exit Short: RSI crosses below oversold or price crosses below basis
exitShort = ta.crossover(rsi, rsiOversold) or close <= basis
if (exitShort)
strategy.close("Short")