
이 전략은 1차 균형 거래 시스템의 기초에 의해 개선되었다. 주요 아이디어는 평평선 이론 지표 1차 균형과 자금 관리 규칙을 결합하여 단선 및 다중 거래 기회를 식별하는 것이다.
이 전략은 고전적인 일회성 균형 시스템을 기본 참조로 사용한다. 주요 구성 요소는 다음과 같다:
전환선: 중간선. 중간 경향을 반영한다.
기준선: 장기선. 장기적인 경향을 반영한다.
앞선 선: 미래 예측 선. 미래 추세를 반영한다.
뒤떨어진 선: 과거 선. 과거의 경향을 반영한다.
이 전략은 다음과 같이 개선되었습니다.
시간 매개 변수 선택은 홀수 제곱 이론을 따르고, 시장 법칙에 더 잘 부합한다.
거래 위험을 통제하기 위해, 중지, 중지, 포지션 크기를 포함한 자금 관리 규칙을 추가하십시오.
전략 테스트를 더 포괄적으로 하기 위해 피드백 범위를 조정할 수 있습니다.
구체적으로 말하면, 다단 입시 조건은 회전 라인에 기준선을 통과하고, 가격보다 뒤떨어진 라인을 통과하고, 가격보다 높은 클라우드 그래프, 클라우드 그래프 미래 예측 시장 등이 포함된다. 공허 입시 조건은 회전 라인에 기준선을 통과하고, 가격보다 뒤떨어진 라인을 통과하는 것을 요구한다.
자금 관리 규칙은 다중 헤드 중지 30%를 요구하고, 손실 5%를 중지합니다. 공허 헤드 중지 손실이 회전 선의 3 배 ATR을 초과 할 때 중단됩니다.
이 전략은 평평한 지표와 재원 관리를 결합한 장점이 있습니다.
첫눈의 균형 시스템은 그 자체로 단기, 중기, 장기적인 경향을 반영하고, entry/exit는 합리적이다.
홀수제곱이론 최적화 파라미트는 시장 통계 법칙에 부합한다.
자금 관리 규칙은 단독 손실을 효과적으로 통제하고, 손실보다 수익이 더 많도록 보장합니다.
리포트 범위는 조정할 수 있으며, 테스트는 더 포괄적이다.
종합적으로, 이 전략은 트렌드, 변수 선택, 위험 제어 등의 여러 가지 요소를 종합적으로 고려하여, 단수 기회를 효과적으로 식별하고 거래 위험을 제어할 수 있으며, 매우 실용적입니다.
이 전략의 주요 위험은 다음과 같습니다.
1인칭 시스템은 가짜 돌파구에 속기 쉽고, 불필요한 진입을 초래한다. 더 많은 지표 필터링 신호와 결합할 수 있다.
고정 스톱 스톱 손실 규칙은 쉽게 틀 수 있으며, 동적 스톱 스톱 손실을 도입할 수 있다.
응답 데이터는 완전하지 않으며 전략의 효과를 과대평가 할 수 있습니다. 더 많은 시장의 응답과 더 많은 시간이 필요합니다.
이 전략은 트렌드 시장에 더 적합하며, 종합 시장의 성능이 좋지 않을 수 있다. 트렌드를 식별하기 위해 입시 조건을 최적화 할 수 있다.
이 전략은 다음의 몇 가지 측면에서 최적화될 수 있습니다.
지표 필터링을 추가하여 입학 품질을 향상시킵니다. MACD, KDJ와 같은 보조 판단 지표
동적 스톱 스톱 . 예를 들어 평균선 N배 ATR을 뚫고 스톱을 하고, 지지점 스톱 을 넘어간다.
다중 품종 재검토 검증. 더 많은 시장과 더 긴 데이터에서 전략 안정성을 검증한다.
트렌드를 구분하고 시장을 정리한다. 입시 메커니즘을 최적화하여 다양한 상황에 적응할 수 있게 한다.
이 전략은 종합적으로 추세, 재원 관리 등 여러 측면의 요소를 고려하고, 1차 균형 지표를 사용하여 단선 다중 거래 기회를 식별하고, 동시에 위험 제어 규칙을 사용하여 단금 손실을 제어한다. 원시 1차 균형 시스템에 비해 크게 개선되었다. 이 전략은 추가적인 최적화를 통해 매우 실용적인 단수 전략이 될 전망이다.
/*backtest
start: 2023-11-27 00:00:00
end: 2023-12-27 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// Author Obarut
//@version=5
strategy("İchimoku Strategy With MM Short-Long",overlay=true,process_orders_on_close=true)
//Ichimoku Inputs
ts_period = input.int(8, minval=1, title="Tenkan-Sen Period")
ks_period = input.int(16, minval=1, title="Kijun-Sen Period")
ssb_period = input.int(24, minval=1, title="Senkou-Span B Period")
cs_offset = input.int(16, minval=1, title="Chikou-Span Offset")
ss_offset = input.int(8, minval=1, title="Senkou-Span Offset")
long_entry = input(true, title="Long Entry")
short_entry = input(true, title="Short Entry")
// Back Testing Period Inputs
fromday = input.int(defval=1,title="Start Date",minval=1,maxval=31)
frommonth = input.int(defval=1,title="Start Month",minval=1,maxval=12)
fromyear = input.int(defval=1980,title="Start Year",minval=1800, maxval=2100)
today = input.int(defval=1,title="En Date",minval=1,maxval=31)
tomonth = input.int(defval=1,title="End Month",minval=1,maxval=12)
toyear =input.int(defval=2100,title="End Year",minval=1800,maxval=2200)
start=timestamp(fromyear,frommonth,fromday,00,00)
finish=timestamp(toyear,tomonth,today,00,00)
timewindow= time>=start and time<=finish
//Ichimoku Componenets Calculation Function
middle(len) => math.avg(ta.lowest(len), ta.highest(len))
// Ichimoku Components
tenkan = middle(ts_period)
kijun = middle(ks_period)
senkouA = math.avg(tenkan, kijun)
senkouB = middle(ssb_period)
//Senkou Span Lines slopes
slopetenkan=(tenkan-tenkan[2])/tenkan
slopekijun= (kijun-kijun[2])/kijun
//Avarage True Range
atr = ta.atr(14)
//Senkou Span Lines
ss_above = math.max(senkouA[ss_offset-1], senkouB[ss_offset-1])
ss_below = math.min(senkouA[ss_offset-1], senkouB[ss_offset-1])
// Price Distance From Tenkan
distance = close - tenkan
// Price Distance from Kijun
distancek = close - kijun
// Entry/Exit Signals
tk_cross_kijun_bull = tenkan >= kijun//Tenkan Sen is greater than or equal to Kijun Sen
tk_cross_kijun_bear = tenkan <= kijun//Tenkan Sen is smaller than or equal to Kijun Sen
cs_cross_bull = close > high[cs_offset-1]//Chikou is above the price
cs_cross_bear = close < close[cs_offset-1]//Chikou is below the price
price_above_kumo = close > ss_above//Price is above the Kumo cloud
pbsenkA = close < ss_above // Price is below the Senkou Span which is higher
pasenkB = close > ss_below// Price is above the Senkou span which is lower
price_below_kumo = close < ss_below // Price is below Kumo cloud
future_kumo_bull = senkouA > senkouB and (ta.roc(senkouA,3)>0) and (ta.roc(senkouB,3)>=0) // Future Kumo cloud is bullish
pbtenkan=close<tenkan
tkbelowkij=tenkan<kijun
future_kumo_bear = senkouA < senkouB//Future Kumo cloud is bearish
// Price Distance From Tenken
disbull = distance < 2*atr
//Price Distance From Kijun
disbullk = distancek < 3*atr
//Price Above Tenkan Condition
patk = close > tenkan
// Kijun Above Senkou Span Condition
kjasenkA = kijun > ss_above
// Price Below Kijun Condition
pbkijun = close < kijun
//Consolidation Tenkan and Kijun are inside Kumo cloud
kijuninsidekumo= kijun<ss_above and kijun>ss_below
tenkaninsidekumo= tenkan<ss_above and tenkan>ss_below
consolidation=kijuninsidekumo and tenkaninsidekumo
//Bullish Entry Condition
bullish= tk_cross_kijun_bull and cs_cross_bull and price_above_kumo and future_kumo_bull and disbull and patk
and not consolidation
//Bullish exit
bearish=tk_cross_kijun_bear and pbsenkA and cs_cross_bear and future_kumo_bear
or price_below_kumo
// Bearish Entry Condition
bearish2=tk_cross_kijun_bear and pbtenkan and tkbelowkij and tkbelowkij and cs_cross_bear and future_kumo_bear
if(bullish and timewindow and long_entry )
strategy.entry("Long Entry", strategy.long)
if(bearish2 and timewindow and short_entry)
strategy.entry("Short Entry",strategy.short)
// Bearish Condition
lastentryprice = strategy.opentrades.entry_price(strategy.opentrades - 1)
// Take Profit or Stop Loss in Bearish
exit1= (close-tenkan)>3*atr and slopetenkan<=0
exit2= (close-lastentryprice)>5*atr and close<(tenkan-0.04*atr)
if(bearish and timewindow and not short_entry or exit1 or exit2 or (close>1.30*lastentryprice ) or (close< 0.95*lastentryprice))
strategy.close("Long Entry")
if(bullish and timewindow and not long_entry)
strategy.close("Short Entry")
if(time>finish)
strategy.close_all("time up")
plot(tenkan, color=#0496ff, title="Tenkan-Sen")
plot(kijun, color=#991515, title="Kijun-Sen")
plot(close, offset=-cs_offset+1, color=#2e640e, title="Chikou-Span")
sa=plot(senkouA, offset=ss_offset-1, color=color.rgb(17, 122, 21), title="Senkou-Span A")
sb=plot(senkouB, offset=ss_offset-1, color=color.rgb(88, 8, 8), title="Senkou-Span B")
fill(sa, sb, color = senkouA > senkouB ? color.rgb(198, 234, 198) : color.rgb(208, 153, 153), title="Cloud color")