헤이켄 아시와 이치모쿠 킨코 히오 거래 전략

저자:차오장, 날짜: 2023-09-18 15:13:35
태그:

전반적인 설명

이 전략은 트렌드 방향을 결정하고 트렌드를 따라가기 위해 하이켄 아시와 이치모쿠 킨코 히오 지표를 결합합니다. 하이켄 아시 평형화는 소음을 줄여줍니다. 이치모쿠는 트렌드 강도를 평가하기 위해 변환 및 기본선과 같은 여러 신호를 사용합니다. 이 조합은 전략의 안정성을 향상시킵니다.

전략 논리

하이켄 아시 폐쇄 가격을 계산하고 전환선, 기본선 등과 같은 이치모쿠 지표를 그래프합니다. 닫는 것이 이전 두 일보다 높고 이치모쿠 상위 가장자리와 후퇴선 위에있을 때 긴 거리로 이동하십시오. 닫는 것이 이전 두 일보다 낮고 이치모쿠 하위 가장자리와 후퇴선 아래에있을 때 짧은 거리로 이동하십시오. 변환 및 기본선 교차는 또한 2차 신호를 제공합니다.

장점

  • 하이켄 아시는 신호 품질을 향상시키는 가짜 브레이크를 필터합니다.
  • 이치모쿠는 여러 개의 검증 신호를 사용합니다.
  • 뒤쳐진 라인은 수익을 보장하는 을 피합니다.
  • 추세를 따라가는 것은 더 오래 보유하고 더 큰 이익을 가져옵니다.

위험성

  • 하이켄 아시 평형은 완벽하게 최적화 될 수 없습니다
  • 이치모쿠 매개 변수는 결과에 큰 영향을 미칩니다.
  • 손실을 증가시키는 장기 보유 위험
  • 짧은 기간에 적합하지 않은 낮은 거래 빈도

리스크는 부드러움, 유지 기간, 이치모쿠 매개 변수를 최적화 등으로 조절할 수 있습니다.

개선

  • 다른 Heiken Ashi 평형 매개 변수를 테스트
  • 이치모쿠 기간 매개 변수를 최적화
  • 출국 후 재입국 규칙을 전략화
  • 다양한 제품에서 견고성을 테스트합니다.

결론

이 전략은 통제 된 드라우다운으로 트렌드 방향을 결정하기 위해 여러 지표를 종합적으로 사용합니다. 조정 매개 변수 등을 통해 성능을 더 향상시킬 수 있습니다.


/*backtest
start: 2023-08-18 00:00:00
end: 2023-09-17 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3

strategy("Heiken Ashi + Ichimoku Kinko Hyo Strategy", shorttitle="HaI", overlay=true, default_qty_type=strategy.percent_of_equity, max_bars_back=1000, default_qty_value=100, calc_on_order_fills= true, calc_on_every_tick=true, pyramiding=0)

hahigh = security(heikinashi(syminfo.tickerid), timeframe.period, high)
halow = security(heikinashi(syminfo.tickerid), timeframe.period, low)

TenkanSenPeriods = input(9, minval=1, title="Tenkan Sen Periods")
KijunSenPeriods = input(24, minval=1, title="Kijun Sen Periods")
SenkouSpanBPeriods = input(51, minval=1, title="Senkou Span B Periods")
displacement = input(24, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
TenkanSen = donchian(TenkanSenPeriods)
KijunSen = donchian(KijunSenPeriods)
SenkouSpanA = avg(TenkanSen, KijunSen)
SenkouSpanB = donchian(SenkouSpanBPeriods)
SenkouSpanH = max(SenkouSpanA[displacement - 1], SenkouSpanB[displacement - 1])
SenkouSpanL = min(SenkouSpanA[displacement - 1], SenkouSpanB[displacement - 1])
ChikouSpan = close[displacement-1]

plot(TenkanSen, color=blue, title="Tenkan Sen", linewidth = 2)
plot(KijunSen, color=maroon, title="Kijun Sen", linewidth = 3)
plot(close, offset = -displacement, color=orange, title="Chikou Span", linewidth = 2)
sa=plot (SenkouSpanA, offset = displacement, color=green,  title="Senkou Span A", linewidth = 2)
sb=plot (SenkouSpanB, offset = displacement, color=red,  title="Senkou Span B", linewidth = 3)
fill(sa, sb, color = SenkouSpanA > SenkouSpanB ? green : red)

longCondition = hahigh > max(hahigh[1],hahigh[2]) and close>ChikouSpan and close>SenkouSpanH and (TenkanSen>=KijunSen or close>KijunSen)
if (longCondition)
    strategy.entry("Long",strategy.long)

shortCondition = halow < min(halow[1],halow[2]) and close<ChikouSpan and close<SenkouSpanL and (TenkanSen<=KijunSen or close<KijunSen)
if (shortCondition)
    strategy.entry("Short",strategy.short)

closelong = halow < min(halow[1],halow[2]) and (TenkanSen<KijunSen or close<TenkanSen or close<KijunSen or close<SenkouSpanH or close<ChikouSpan)
if (closelong)
    strategy.close("Long")

closeshort = hahigh > max(hahigh[1],hahigh[2]) and (TenkanSen>KijunSen or close>TenkanSen or close>KijunSen or close>SenkouSpanL or close>ChikouSpan)
if (closeshort)
    strategy.close("Short")

더 많은