무작위 오스실레이션 전략

저자:차오장, 날짜: 2023-11-06 09:30:27
태그:

img

전반적인 설명

무작위 오시레이션 전략은 이치모쿠 킨코 히오, MACD 및 헐 이동 평균을 포함한 여러 기술적 지표를 통합하여 체계적인 거래 결정 시스템을 형성합니다. 오시레이션 시장에서 트렌드 역전 포인트와 잠재적 인 기회를 포착하는 것을 목표로합니다.

전략 논리

우선 이치모쿠 킨코 히오의 텐칸센과 키준센이 채택된다. 텐칸센은 지난 9 기간 동안 가장 높은 최고와 가장 낮은 최저의 평균으로 계산된다. 키준센은 지난 24 기간 동안 가장 높은 최고와 가장 낮은 최저의 평균이다. 가격과 키준센의 크로스오버는 거래 신호로 작용한다.

둘째, MACD 지표는 트렌드를 따르는 중요한 동력 지표로 통합됩니다. 두 개의 가격 EMA 사이의 관계를 보여줍니다. MACD와 신호 라인의 크로스오버는 거래 신호를 생성합니다.

세 번째로, 헐 이동 평균은 이동 평균의 지연 문제를 개선하고 가격 반전을 잡는 감수성을 높이기 위해 도입되었습니다. 반, 전체 및 제곱 뿌리 기간의 WMA를 사용하여 계산됩니다. 빠른 및 느린 헐 MA 사이의 크로스오버 또한 보조 신호로 작용합니다.

마지막으로, 전략은 위의 모든 지표를 결합하여 견고한 거래 시스템을 형성합니다. 여러 지표가 만장일치 신호를 제공 할 때만 실제 입출출이 발생합니다.

장점

  • 여러 지표를 통한 다양화는 단점 실패를 줄여줍니다.

  • 통합은 전체적인 모델을 통해 더 강력한 의사결정 권한을 제공합니다.

  • 모든 신호가 다른 신호에 의해 확인되기 때문에 잘못된 신호가 감소합니다.

  • 고소감 신호에만 작용하여 효율성을 향상시킵니다.

  • 변화하는 시장에 전략을 조정할 수 있는 매개 변수

  • 헐 이동 평균에서 늦어지고 더 빠른 반응

위험성

  • 잘못된 신호가 증가하는 시장에서 위험도가 높습니다.

  • 지표 매개 변수가 제대로 최적화되지 않으면 효과적이지 않습니다.

  • 역행에 집중해서 트렌드 움직임을 놓칠 수 있습니다.

  • 헬스 MA는 비교적 새롭고 장기적으로 입증되지 않았습니다.

  • 드물게 거래하면 기회를 놓칠 수 있습니다.

강화

  • 볼링거 밴드 같은 더 많은 지표를 추가하면 시스템을 더욱 최적화 할 수 있습니다.

  • 매개 변수 조정이 다른 자산과 시간 프레임에 최적의 조합을 찾기 위해.

  • 단일 거래 손실을 통제하기 위해 동적 중지 도입.

  • 트렌드 리드를 놓치지 않도록 트렌드 필터를 포함합니다.

  • 시장 조건에 따라 빈도와 크기를 조정하여 포지션 크기를 최적화하십시오.

결론

랜덤 오시설션 전략은 범위 제한 시장에서 기회를 포착하기 위해 여러 기술적 분석 기술을 결합합니다. 지표 통합, 잘못된 신호 감소 및 향상된 효율성의 장점을 제공합니다. 그러나 추가 최적화 및 적응이 필요한 내재적 위험도 가지고 있습니다. 전반적으로, 오시일링 시장을 거래하기위한 견고하고 실용적인 접근 방식을 나타냅니다.


/*backtest
start: 2022-10-30 00:00:00
end: 2023-11-05 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
strategy("Ichimoku Kinko Hyo + HULL-MA_X + MacD", shorttitle="@m", 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)

keh=input(title="Double HullMA",defval=12, minval=1)

n2ma=2*wma(close,round(keh/2))
nma=wma(close,keh)
diff=n2ma-nma
sqn=round(sqrt(keh))
n2ma1=2*wma(close[1],round(keh/2))
nma1=wma(close[1],keh)
diff1=n2ma1-nma1
sqn1=round(sqrt(keh))
n1=wma(diff,sqn)
n2=wma(diff1,sqn)
b=n1>n2?lime:red
c=n1>n2?green:red
d=n1>n2?red:green

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)
LS=close, offset = -displacement

MACD_Length = input(9)
MACD_fastLength = input(12)
MACD_slowLength = input(24)
MACD = ema(close, MACD_fastLength) - ema(close, MACD_slowLength)
aMACD = ema(MACD, MACD_Length)

a1=plot(n1,color=c)
a2=plot(n2,color=c)
plot(cross(n1, n2) ? n1 : na, style = circles, color=b, linewidth = 4)
plot(cross(n1, n2) ? n1 : na, style = line, color=d, linewidth = 3)
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)
p1=plot (SenkouSpanA, offset = displacement, color=green,  title="Senkou Span A", linewidth = 2)
p2=plot (SenkouSpanB, offset = displacement, color=red,  title="Senkou Span B", linewidth = 3)
fill(p1, p2, color = SenkouSpanA > SenkouSpanB ? green : red)

closelong = n1<n2 and close<n2 and (MACD<aMACD or TenkanSen<KijunSen or close<KijunSen)
if (closelong)
    strategy.close("Long")

closeshort = n1>n2 and close>n2 and (MACD>aMACD or TenkanSen>KijunSen or close>KijunSen)
if (closeshort)
    strategy.close("Short")

longCondition = n1>n2 and close>n2 and MACD>aMACD and (TenkanSen>KijunSen or close>KijunSen) 
if (longCondition)
    strategy.entry("Long",strategy.long)

shortCondition = n1<n2 and close<n2 and MACD<aMACD and (TenkanSen<KijunSen or close<KijunSen)
if (shortCondition)
    strategy.entry("Short",strategy.short)

더 많은