이치모쿠 클라우드와 RSI 결합 전략

저자:차오장, 날짜: 2023-09-21 10:52:13
태그:

전반적인 설명

이 전략은 이치모쿠 클라우드와 상대적 강도 지표 (RSI) 인디케이터를 결합하여 트렌드 방향을 결정하고 트렌드가 시작될 때 포지션을 입력합니다. 이치모쿠 라인 3개가 RSI 신호와 함께 유효한 조합으로 정렬될 때 거래 신호를 생성합니다.

전략 논리

  1. 이치모쿠 클라우드의 텐칸센, 키준센, 치코 스판 선을 계산합니다.
  2. RSI 값 계산
  3. 텐칸센이 키준센 위를 넘고, 치코 스판이 구름 위를 넘고, 가격이 구름 위를 넘고,
  4. 텐칸센이 키준센 아래로, 치코 스판이 구름 아래로, 가격이 구름 아래로, 그리고 RSI가 50 이상으로 넘어갈 때 짧은 순위를 선택하세요.
  5. 역 신호가 발생하면 닫기 위치

특히 이치모쿠 클라우드의 트렌드 분석과 RSI의 과잉 매수 가이드를 결합합니다. 이치모쿠 라인이 트렌드 시작 형성에 맞춰지면 엔트리 신호가 생성되며 RSI는 과잉 매수 상태를 보여주지 않습니다. RSI 필터는 통합 중에 잘못된 브레이크오프를 피하는 데 도움이됩니다. 출구는 이치모쿠 역 포메이션을 완전히 따르고 있습니다.

이점 분석

  1. RSI를 결합하면 입력 정확도가 향상됩니다.
  2. 이치모쿠 클라우드는 용량을 따라 강한 추세를 보이고 있습니다.
  3. 신호는 간단하고 직관적입니다.
  4. 사용자 정의 가능한 매개 변수는 다른 사이클에 적합합니다.
  5. 스톱프로프트/손실으로 관리되는 위험

위험 분석

  1. 이치모쿠 클라우드가 뒤떨어질 수 있어
  2. 매개 변수 최적화, 그렇지 않으면 부정확 신호를 요구
  3. 장기 보유는 하루 하루 위험을 가져옵니다.
  4. 거짓 신호에 취약한 RSI
  5. 역전으로 갇히는 위험

위험은 매개 변수 최적화, 스톱 이익/손실 조정, 보유 기간 제한 등을 통해 관리 될 수 있습니다.

최적화 방향

  1. 가장 좋은 조합을 위해 다른 라인 및 RSI 매개 변수를 테스트합니다.
  2. 후속 스톱 손실을 도입
  3. 거래 시간 제한을 평가
  4. 제품별 연구 매개 변수 선호도
  5. 시험 재입입수 및 피라미드 규칙의 덧셈
  6. 다른 스톱프로프트/손실 전략을 비교

요약

이 전략은 트렌드 분석과 거래를 위해 이치모쿠 클라우드와 RSI를 결합합니다. 장점은 간단한 직관적인 신호와 높은 ROI입니다; 단점은 지연 및 함락된 위험입니다. 성능은 매개 변수 최적화, 중지 이익 / 손실 조정, 거래 시간 제어 등을 통해 향상되고 위험을 제어 할 수 있습니다. 이치모쿠 클라우드 응용 프로그램의 포괄적 인 이해를 허용합니다.


/*backtest
start: 2022-09-14 00:00:00
end: 2023-09-20 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Coinrule

//@version=5
strategy("Ichimoku Cloud with RSI (By Coinrule)",
         overlay=true,
         initial_capital=1000,
         process_orders_on_close=true,
         default_qty_type=strategy.percent_of_equity,
         default_qty_value=30,
         commission_type=strategy.commission.percent,
         commission_value=0.1)

showDate = input(defval=true, title='Show Date Range')
timePeriod = time >= timestamp(syminfo.timezone, 2022, 6, 1, 0, 0)


// RSI inputs and calculations
lengthRSI = 14
RSI = ta.rsi(close, lengthRSI)


//Inputs
ts_bars = input.int(9, minval=1, title="Tenkan-Sen Bars")
ks_bars = input.int(26, minval=1, title="Kijun-Sen Bars")
ssb_bars = input.int(52, minval=1, title="Senkou-Span B Bars")
cs_offset = input.int(26, minval=1, title="Chikou-Span Offset")
ss_offset = input.int(26, minval=1, title="Senkou-Span Offset")
long_entry = input(true, title="Long Entry")
short_entry = input(true, title="Short Entry")

middle(len) => math.avg(ta.lowest(len), ta.highest(len))


// Components of Ichimoku Cloud
tenkan = middle(ts_bars)
kijun = middle(ks_bars)
senkouA = math.avg(tenkan, kijun)
senkouB = middle(ssb_bars)


// Plot Ichimoku Cloud
plot(tenkan, color=#0496ff, title="Tenkan-Sen")
plot(kijun, color=#991515, title="Kijun-Sen")
plot(close, offset=-cs_offset+1, color=#459915, title="Chikou-Span")
sa=plot(senkouA, offset=ss_offset-1, color=color.green, title="Senkou-Span A")
sb=plot(senkouB, offset=ss_offset-1, color=color.red, title="Senkou-Span B")
fill(sa, sb, color = senkouA > senkouB ? color.green : color.red, title="Cloud color")

ss_high = math.max(senkouA[ss_offset-1], senkouB[ss_offset-1])
ss_low = math.min(senkouA[ss_offset-1], senkouB[ss_offset-1])


// Entry/Exit Conditions
tk_cross_bull = tenkan > kijun
tk_cross_bear = tenkan < kijun
cs_cross_bull = ta.mom(close, cs_offset-1) > 0
cs_cross_bear = ta.mom(close, cs_offset-1) < 0
price_above_kumo = close > ss_high
price_below_kumo = close < ss_low

bullish = tk_cross_bull and cs_cross_bull and price_above_kumo
bearish = tk_cross_bear and cs_cross_bear and price_below_kumo

strategy.entry("Long", strategy.long, when=bullish and long_entry and RSI < 50 and timePeriod)
strategy.close("Long", when=bearish and not short_entry)

strategy.entry("Short", strategy.short, when=bearish and short_entry and RSI > 50 and timePeriod)
strategy.close("Short", when=bullish and not long_entry)

더 많은