
이 전략은 여러 지표를 결합한 복합 거래 시스템으로, 주로 지수 이동 평균(EMA), 슈퍼 트렌드, 볼린저 밴드, 상대 강도 지수(RSI)에 대한 포괄적인 분석을 기반으로 합니다. 이 전략의 핵심 논리는 EMA와 Supertrend를 중심으로 거래 신호를 구축하는 동시에 Bollinger Bands와 RSI를 결합하여 시장 변동성과 모멘텀에 대한 보조적 판단을 제공하는 것입니다. 거래 시스템은 일간, 주간, 월간 기간을 포함한 다중 기간 RSI 분석을 사용하여 거래 결정에 대한 보다 포괄적인 시장 관점을 제공합니다.
이 전략은 다층 기술 지표를 조합하여 시장 동향과 변동성 기회를 포착합니다.
거래 신호 트리거 조건:
이 전략은 여러 기술 지표를 유기적으로 결합하여 비교적 완전한 거래 시스템을 구축합니다. EMA와 Supertrend를 조합하면 주요 거래 신호가 제공되고, ADX 스크리닝을 통해 강력한 추세 환경에서 거래가 이루어지는지 확인할 수 있으며, Bollinger Bands와 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"}]
*/
//made by Chinmay
//@version=6
strategy("CJ - Multi1", overlay=true)
// Input for RSI length
rsi_length = input.int(14, title="RSI Length")
// Calculate Daily RSI
daily_rsi = ta.rsi(close, rsi_length)
// Calculate Weekly RSI (using security function to get weekly data)
weekly_rsi = request.security(syminfo.tickerid, "W", ta.rsi(close, rsi_length))
// Calculate Monthly RSI (using security function to get weekly data)
monthly_rsi = request.security(syminfo.tickerid, "M", ta.rsi(close, rsi_length))
// Plot the RSIs
plot(daily_rsi, color=color.blue, title="Daily RSI", linewidth=2)
plot(weekly_rsi, color=color.red, title="Weekly RSI", linewidth=2)
plot(monthly_rsi, color=color.black, title="Monthly RSI", linewidth=2)
// Create horizontal lines at 30, 50, and 70 for RSI reference
hline(30, "Oversold", color=color.green)
hline(70, "Overbought", color=color.red)
hline(50, "Neutral", color=color.gray)
// Bollinger Bands Calculation
bb_length = 20
bb_mult = 2
bb_stddev = ta.stdev(close, bb_length)
bb_average = ta.sma(close, bb_length)
bb_upper = bb_average + bb_mult * bb_stddev
bb_lower = bb_average - bb_mult * bb_stddev
plot(bb_upper, color=color.new(#ffb13b, 0), linewidth=2)
plot(bb_average, color=color.new(#b43bff, 0), linewidth=2)
plot(bb_lower, color=color.new(#ffb13b, 0), linewidth=2)
// Inputs for EMA
ema_L1 = input.int(defval=13, title="EMA Length 1")
ema_L2 = input.int(defval=34, title="EMA Length 2")
ema_L3 = input.int(defval=100, title="EMA Length 3")
adx_level = input.int(defval=25, title="ADX Level")
// Inputs for Supertrend
atr_l = input.int(defval=10, title="ATR Length")
factor = input.float(defval=3.0, title="Supertrend Multiplier")
// Calculate EMA
ema1 = ta.ema(close, ema_L1)
ema2 = ta.ema(close, ema_L2)
ema3 = ta.ema(close, ema_L3)
// Calculate Supertrend
[supertrend, direction] = ta.supertrend(factor, atr_l)
// Calculate ADX and DI
[diplus, diminus, adx] = ta.dmi(14,14)
// Buy and Sell Conditions
buy = direction == -1 and ema1 > ema2 and close > ta.ema(close, 100) and adx > adx_level
short = direction == -1 and ema1 < ema2 and close < ta.ema(close, 100) and adx > adx_level
sell = ta.crossunder(close, supertrend)
cover = ta.crossover(close, supertrend)
// Strategy Logic
if buy
strategy.entry("Buy", strategy.long, comment="Long Entry")
if sell
strategy.close("Buy", comment="Sell Exit")
// Uncomment for Short Strategy
if short
strategy.entry("Short", strategy.short, comment="Short Entry")
if cover
strategy.close("Short", comment="Cover Exit")