
이중 RSI 전략은 RSI 외향과 RSI 교차를 결합한 고전적인 두 가지 거래 방법을 결합한 고급 수량 거래 전략이다. 이 전략은 RSI 지표의 외향과 교차 신호를 동시에 모니터링하여 시장에서 더 신뢰할 수 있는 매수점을 포착하는 것을 목표로 한다. 이 전략의 핵심 아이디어는 RSI 외향과 RSI 교차가 동시에 나타나는 경우에만 거래 신호를 유발한다는 것이며, 이중 확인 메커니즘은 거래의 정확성과 신뢰성을 높이는 데 도움이 된다.
RSI는 다음과 같이 말했습니다.
RSI 교차
신호 생성:
변수 설정:
높은 신뢰성: RSI의 이탈과 교차의 두 가지 신호를 결합하여 거래 신호의 신뢰성을 크게 향상시키고 가짜 신호의 위험을 줄입니다.
트렌드 잡기: 시장의 트렌드를 효과적으로 포착할 수 있는 전환점, 중장기 거래에 적합하다.
유연성: 전략의 핵심 매개 변수는 다양한 시장 환경과 거래 유형에 따라 조정할 수 있습니다.
위험 제어: 엄격한 이중 확인 메커니즘을 통해 거래 위험을 효과적으로 제어합니다.
시각화 지원: 전략은 명확한 차트 표시를 제공하여 거래자가 시장 상황을 직관적으로 이해할 수 있습니다.
지연성: 이중 확인을 필요로 하기 때문에 빠른 진행의 초기 단계를 놓칠 수 있습니다.
과도한 RSI 의존: 특정 시장 조건에서 단일 지표는 시장 상황을 완전히 반영하지 못할 수 있습니다.
매개 변수 민감성: 매개 변수 설정이 서로 다른 거래 결과를 초래할 수 있으므로 신중한 최적화가 필요합니다.
가짜 신호 위험: 이중 확인 메커니즘이 가짜 신호 위험을 줄였음에도 불구하고, 격렬한 변동성 시장에서는 여전히 발생할 수 있습니다.
중단 장치의 부재: 전략 자체에는 내장 된 중단 장치가 없으며, 거래자가 추가 설정해야합니다.
다중 지표 결합: 다른 기술 지표를 도입하여 (MACD, 브린 밴드 등) 교차 검증을 통해 신호 신뢰성을 더욱 향상시킨다.
자기 적응 파라미터: 시장의 변동에 따라 RSI 주기와 하락값을 동적으로 조정하여 다른 시장 환경에 적응합니다.
손해 제도를 추가: ATR 또는 고정 비율에 기반한 손해 제도를 설계하여 단일 거래의 위험을 제어한다.
시간 필터: 불리한 시간에 거래하는 것을 피하기 위해 거래 시간 창 제한을 추가합니다.
변동률 필터: 낮은 변동률 환경에서 거래 신호를 억제하여 가짜 돌파의 위험을 줄인다.
양과 가격 결합: 거래량 분석을 도입하여 신호의 신뢰성을 높인다.
기계 학습 최적화: 기계 학습 알고리즘을 사용하여 매개 변수 선택을 최적화하여 전략의 적응성을 향상시킵니다.
이중 RSI 전략은 RSI 이탈과 교차 신호를 능숙하게 결합하여 강력하고 유연한 거래 시스템을 만듭니다. 그것은 시장 추세의 중요한 전환점을 효과적으로 포착 할 수있을뿐만 아니라, 이중 확인 메커니즘을 통해 거래 신호의 신뢰성을 크게 향상시킵니다. 전략에는 약간의 지연성과 변수 민감성 등의 위험이 있지만, 합리적인 최적화 및 위험 관리를 통해 이러한 문제는 효과적으로 완화 될 수 있습니다.
/*backtest
start: 2024-06-30 00:00:00
end: 2024-07-30 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Combined RSI Strategies", overlay=true)
// Input parameters for the first strategy (RSI Divergences)
len = input(14, minval=1, title="RSI Length")
ob = input(defval=70, title="Overbought", type=input.integer, minval=0, maxval=100)
os = input(defval=30, title="Oversold", type=input.integer, minval=0, maxval=100)
xbars = input(defval=90, title="Div lookback period (bars)?", type=input.integer, minval=1)
// Input parameters for the second strategy (RSI Crossover)
rsiBuyThreshold = input(30, title="RSI Buy Threshold")
rsiSellThreshold = input(70, title="RSI Sell Threshold")
// RSI calculation
rsi = rsi(close, len)
// Calculate highest and lowest bars for divergences
hb = abs(highestbars(rsi, xbars))
lb = abs(lowestbars(rsi, xbars))
// Initialize variables for divergences
var float max = na
var float max_rsi = na
var float min = na
var float min_rsi = na
var bool pivoth = na
var bool pivotl = na
var bool divbear = na
var bool divbull = na
// Update max and min values for divergences
max := hb == 0 ? close : na(max[1]) ? close : max[1]
max_rsi := hb == 0 ? rsi : na(max_rsi[1]) ? rsi : max_rsi[1]
min := lb == 0 ? close : na(min[1]) ? close : min[1]
min_rsi := lb == 0 ? rsi : na(min_rsi[1]) ? rsi : min_rsi[1]
// Compare current bar's high/low with max/min values for divergences
if close > max
max := close
if rsi > max_rsi
max_rsi := rsi
if close < min
min := close
if rsi < min_rsi
min_rsi := rsi
// Detect pivot points for divergences
pivoth := (max_rsi == max_rsi[2]) and (max_rsi[2] != max_rsi[3]) ? true : na
pivotl := (min_rsi == min_rsi[2]) and (min_rsi[2] != min_rsi[3]) ? true : na
// Detect divergences
if (max[1] > max[2]) and (rsi[1] < max_rsi) and (rsi <= rsi[1])
divbear := true
if (min[1] < min[2]) and (rsi[1] > min_rsi) and (rsi >= rsi[1])
divbull := true
// Conditions for RSI crossovers
isRSICrossAboveThreshold = crossover(rsi, rsiBuyThreshold)
isRSICrossBelowThreshold = crossunder(rsi, rsiSellThreshold)
// Combined buy and sell conditions
buyCondition = divbull and isRSICrossAboveThreshold
sellCondition = divbear and isRSICrossBelowThreshold
// Generate buy/sell signals
if buyCondition
strategy.entry("Bat Signal Buy", strategy.long)
if sellCondition
strategy.entry("Bat Signal Sell", strategy.short)
// Plot RSI
plot(rsi, "RSI", color=color.blue)
hline(ob, title="Overbought", color=color.red)
hline(os, title="Oversold", color=color.green)
hline(rsiBuyThreshold, title="RSI Buy Threshold", color=color.green)
hline(rsiSellThreshold, title="RSI Sell Threshold", color=color.red)
// Plot signals
plotshape(series=buyCondition, title="Bat Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="Bat Signal")
plotshape(series=sellCondition, title="Bat Sell", location=location.abovebar, color=color.red, style=shape.labeldown, text="Bat Sell")