
이 전략은 슈퍼트렌드, 상대 강도(RS), 상대 강도 지수(RSI)를 기반으로 한 추세 추종 전략입니다. 이 세 가지 기술 지표를 종합적으로 적용하면 시장 추세가 명확할 때 시장에 진입하고 동적 손절매를 설정하여 위험을 통제할 수 있습니다. 이 전략은 주로 가격의 강력한 상승 추세를 포착하여 수익을 얻는 동시에 RSI 지표를 결합하여 추세의 지속 가능성을 확인합니다.
이 전략은 거래 신호를 결정하기 위해 3중 필터링 메커니즘을 사용합니다.
이 전략은 Supertrend, RS, RSI라는 세 가지 기술 지표를 종합적으로 활용하여 비교적 완전한 트렌드 추적 거래 시스템을 구축합니다. 이 전략의 가장 큰 장점은 다중 신호 확인 메커니즘을 통해 거래의 신뢰성이 향상되고, 명확한 위험 관리 메커니즘을 통해 거래 보호 기능도 제공한다는 점입니다. 잠재적인 위험은 존재하지만, 추천된 최적화 방향을 통해 전략의 안정성과 수익성을 더욱 개선할 수 있습니다. 이 전략은 특히 추세가 명확한 시장 환경에서 사용하기에 적합하며, 중기 및 장기 거래를 위한 기본 전략 프레임워크로 활용할 수 있습니다.
/*backtest
start: 2019-12-23 08:00:00
end: 2025-01-04 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Sanjay RS&RSI Strategy V3 for nifty 15min, SL-1.3", overlay=true)
// Inputs
atrLength = input.int(10, title="ATR Length")
factor = input.float(3.0, title="ATR Multiplier")
rsPeriod = input.int(55, title="RS Period")
rsiPeriod = input.int(14, title="RSI Period")
rsiThreshold = input.float(60, title="RSI Threshold")
stopLossPercent = input.float(2.0, title="Stop Loss (%)", step=0.1) // Adjustable Stop Loss in Percentage
// Supertrend Calculation
[supertrendDirection, supertrend] = ta.supertrend(factor, atrLength)
// RS Calculation
rs = (close - ta.lowest(close, rsPeriod)) / (ta.highest(close, rsPeriod) - ta.lowest(close, rsPeriod)) * 100
// RSI Calculation
rsi = ta.rsi(close, rsiPeriod)
// Entry Conditions
buyCondition = (supertrendDirection > 0) and (rs > 0) and (rsi > rsiThreshold)
// Exit Conditions
exitCondition1 = (supertrendDirection < 0)
exitCondition2 = (rs <= 0)
exitCondition3 = (rsi < rsiThreshold)
exitCondition = (exitCondition1 and exitCondition2) or (exitCondition1 and exitCondition3) or (exitCondition2 and exitCondition3)
// Plot Supertrend
plot(supertrend, title="Supertrend", color=supertrendDirection > 0 ? color.green : color.red, linewidth=2)
// Strategy Entry
if (buyCondition)
strategy.entry("Buy", strategy.long)
// Add Stop Loss with strategy.exit
stopLossLevel = strategy.position_avg_price * (1 - stopLossPercent / 100)
strategy.exit("SL Exit", from_entry="Buy", stop=stopLossLevel)
// Strategy Exit (Additional Conditions)
if (exitCondition)
strategy.close("Buy")