
이 전략은 RSI(상대 강도 지수)와 CCI(수렴 지수)를 기반으로 한 이중 기술 분석 거래 시스템입니다. 이 두 가지 고전적 기술 지표의 매수 과다 및 매도 과다 신호를 위험-보상 비율과 고정 손절매와 결합하여 완전한 거래 의사 결정 프레임워크를 구축합니다. 전략의 핵심은 이중 지표의 교차 확인을 통해 거래 신호의 신뢰성을 높이는 동시에 완전한 위험 관리 메커니즘을 통합하는 것입니다.
이 전략은 다음과 같은 핵심 원칙에 따라 운영됩니다.
이는 고전적인 기술 지표와 현대적인 위험 관리 개념을 결합한 완전한 거래 시스템입니다. 두 가지 기술 지표의 확인 메커니즘을 통해 신호 신뢰도가 향상되고, 엄격한 위험 관리 조치와 결합하여 논리적으로 엄격하고 실용적인 거래 전략이 형성됩니다. 일정한 한계는 있지만, 지속적인 최적화와 개선을 통해 이 전략은 실제 적용에 좋은 전망을 가지고 있습니다. 변동성 인식, 추세 확인 및 위험 관리를 지속적으로 최적화함으로써 전략의 안정성과 실용성이 더욱 향상될 것입니다.
/*backtest
start: 2024-12-29 00:00:00
end: 2025-01-05 00:00:00
period: 5m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// TradingView Pine Script for RSI & CCI-Based Strategy
//@version=6
strategy("RSI & CCI Strategy", overlay=true)
// User Inputs
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(80, title="RSI Overbought Level")
rsiOversold = input.int(20, title="RSI Oversold Level")
cciLength = input.int(20, title="CCI Length")
cciOverbought = input.int(200, title="CCI Overbought Level")
cciOversold = input.int(-200, title="CCI Oversold Level")
riskRewardRatio = input.float(2.0, title="Risk-Reward Ratio")
fixedStopLoss = input.float(1.0, title="Fixed Stop Loss (Percentage)", minval=0.1)
// RSI and CCI Calculations
rsi = ta.rsi(close, rsiLength)
cci = ta.cci(close, cciLength)
// Entry Conditions
longCondition = (rsi < rsiOversold) and (cci < cciOversold)
shortCondition = (rsi > rsiOverbought) and (cci > cciOverbought)
// Initialize variables for stop loss and take profit
var float longStopLoss = na
var float longTakeProfit = na
var float shortStopLoss = na
var float shortTakeProfit = na
// Plot Buy and Sell Signals
if (longCondition)
label.new(bar_index, low, "BUY", style=label.style_label_up, color=color.green, textcolor=color.white)
longEntryPrice = close
longStopLoss := longEntryPrice * (1 - fixedStopLoss / 100)
longTakeProfit := longEntryPrice + (longEntryPrice - longStopLoss) * riskRewardRatio
// line.new(bar_index, longEntryPrice, bar_index, longStopLoss, color=color.red, width=1, extend=extend.none)
// line.new(bar_index, longEntryPrice, bar_index, longTakeProfit, color=color.green, width=1, extend=extend.none)
if (shortCondition)
label.new(bar_index, high, "SELL", style=label.style_label_down, color=color.red, textcolor=color.white)
shortEntryPrice = close
shortStopLoss := shortEntryPrice * (1 + fixedStopLoss / 100)
shortTakeProfit := shortEntryPrice - (shortStopLoss - shortEntryPrice) * riskRewardRatio
// line.new(bar_index, shortEntryPrice, bar_index, shortStopLoss, color=color.green, width=1, extend=extend.none)
// line.new(bar_index, shortEntryPrice, bar_index, shortTakeProfit, color=color.red, width=1, extend=extend.none)
// Strategy Information and Alerts
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit/Stop Loss", from_entry="Long", limit=longTakeProfit, stop=longStopLoss)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit/Stop Loss", from_entry="Short", limit=shortTakeProfit, stop=shortStopLoss)