
이 전략은 Supertrend 트렌드 지표와 RSI (대비적으로 강한 지표) 를 결합한 거래 시스템입니다. 전략은 트렌드 추적과 동력 지표를 결합하여 시장 추세가 명확하고 좋은 동력이있는 경우에 거래합니다. 시스템은 ATR (평균 실제 파동) 을 사용하여 동적인 지원 및 저항 수준을 계산하고 RSI와 결합하여 오버 바이 오버 세 신호를 통해 진입 시간을 결정합니다.
전략의 핵심 논리는 다음과 같은 핵심 요소에 기초합니다.
이 전략은 슈퍼트렌드와 RSI 지표를 결합하여 전체적인 트렌드 추적 거래 시스템을 구축한다. 전략은 트렌드가 명확한 시장에서 더 잘 작동하며, 동적 스톱로즈와 합리적인 스톱 스톱 설정을 통해 위험을 통제한다. 일부 제한 사항이 있지만, 제안된 최적화 방향은 전략의 안정성과 적합성을 더욱 향상시킬 수 있다. 전략은 중장기 트렌드를 추적하는 데 적합하며, 일정 수익성을 유지하면서 위험을 더 잘 통제한다.
/*backtest
start: 2024-04-11 00:00:00
end: 2025-02-19 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Supertrend + RSI Strategy", overlay=true)
// Input Parameters
atrLength = input.int(10, title="ATR Length", minval=1)
factor = input.float(3.0, title="Supertrend Factor", step=0.1)
rsiLength = input.int(14, title="RSI Length", minval=1)
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// Supertrend Calculation
atr = ta.atr(atrLength)
upperBand = ta.sma(close, atrLength) + (factor * atr)
lowerBand = ta.sma(close, atrLength) - (factor * atr)
supertrend = 0.0
supertrend := close > nz(supertrend[1], close) ? lowerBand : upperBand
supertrendSignal = close > supertrend ? "Buy" : "Sell"
// RSI Calculation
rsi = ta.rsi(close, rsiLength)
// Trading Logic
longCondition = (supertrendSignal == "Buy") and (rsi > rsiOversold)
shortCondition = (supertrendSignal == "Sell") and (rsi < rsiOverbought)
// Entry and Exit Conditions
if longCondition
strategy.entry("Long", strategy.long)
if shortCondition
strategy.entry("Short", strategy.short)
// Plot Supertrend
plot(supertrend, title="Supertrend", color=color.new(color.blue, 0), linewidth=2, style=plot.style_line)
// Plot RSI Levels
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsi, title="RSI", color=color.orange, style=plot.style_stepline)
// Alerts
alertcondition(longCondition, title="Buy Alert", message="Supertrend + RSI Buy Signal")
alertcondition(shortCondition, title="Sell Alert", message="Supertrend + RSI Sell Signal")