
이중 이동 평균 선의 골드 크로스 전략은 이동 평균을 기반으로 한 양적 거래 전략이다. 이 전략은 다른 주기의 이동 평균을 계산하여 시장의 추세와 매매 시기를 판단한다. 단기 이동 평균 위에 장기 이동 평균을 가로지르면, 구매 신호로 골드 크로스를 생성하고, 단기 이동 평균 아래에 장기 이동 평균을 가로지르면, 판매 신호로 데드 크로스를 생성한다.
이중 이동 평균 골드 크로스 전략의 핵심 논리는 이동 평균의 평평한 특성에 기반한다. 이동 평균은 시장 소음을 효과적으로 필터링하여 대략적인 추세 방향을 나타냅니다. 단기 이동 평균은 가격 변화에 더 민감하며 최근 기간 동안의 가격 변동 정보를 포착 할 수 있습니다.
이중 이동평균선 전략의 또 다른 핵심은 RSI 지표이다. RSI는 시장이 과매매 상태인지 여부를 효과적으로 판단할 수 있다. RSI와 결합하면 시장 전환점 근처에서 잘못된 거래가 발생하는 것을 피할 수 있다. 이 전략은 RSI 지표가 조건을 충족하는 경우에만 구매 및 판매 신호를 생성한다.
특히, 이 전략의 거래 결정 논리는 다음과 같습니다.
이 전략은 여러 매개 변수의 조합을 통해 가짜 신호를 효과적으로 필터링하여 거래 의사 결정의 정확성을 향상시킬 수 있습니다.
이중 이동평균선 골드 크로스 전략은 다음과 같은 장점이 있다:
이중 이동평균선 골드 크로스 전략에는 다음과 같은 위험도 있습니다.
위험성을 줄이기 위해 다음과 같은 측면에서 최적화할 수 있습니다.
이 두 개의 이동평등선 골드 크로스 전략에는 더 많은 최적화가 가능합니다:
이중 이동평균선 골드크로스 전략은 매우 고전적인 규칙형의 양적 거래 전략이다. 그것은 간단하고 구현하기 쉽으며, 매개 변수를 최적화하는 것은 유연하며, 수익 성과도 우수하며, 초보자 입문 양적 거래에 좋은 선택이다. 그러나 이 전략에는 또한 제한이 있으며, 추가 연구 및 최적화를 통해 더 높은 지능화 및 안정성으로 나아갈 수 있으며, 실제로 지속적으로 수익을 창출할 수 있다.
/*backtest
start: 2024-01-09 00:00:00
end: 2024-01-16 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
//Based on Larry Connors RSI-2 Strategy - Lower RSI
strategy(title="EA_3Minute_MagnetStrat", shorttitle="EA_3Minute_MagnetStrat", overlay=false)
src = close,
//RSI CODE
up = rma(max(change(src), 0), 30)
down = rma(-min(change(src), 0), 30)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
//Criteria for Moving Avg rules
ma20= vwma(close,20)
ma50 = vwma(close,50)
ma100= vwma(close,100)
//Rule for RSI Color
//col = ma30 > ma50 > ma200 and rsi <=53?lime: ma50 < ma200 and rsi >= 60?red : silver
long1 = ma20 > ma50 and ma50 > ma100 and rsi < 50
short1 = ma20 < ma50 and ma50 < ma100 and rsi > 48.5
//plot(rsi, title="RSI", style=line, linewidth=1,color=col)
//plot(100, title="Upper Line 100",style=line, linewidth=3, color=aqua)
//plot(0, title="Lower Line 0",style=line, linewidth=3, color=aqua)
//band1 = plot(60, title="Upper Line 60",style=line, linewidth=1, color=aqua)
//band0 = plot(44, title="Lower Line 40",style=line, linewidth=1, color=aqua)
//fill(band1, band0, color=silver, transp=90)
//strategy.entry ("buy", strategy.long, when=long)
//strategy.entry ("sell", strategy.short, when=short)
//plot(long,"long",color=green,linewidth=1)
//plot(short,"short",color=red,linewidth=1)
//
long = long1[1] == 0 and long1 == 1
short = short1[1] == 0 and short1 == 1
longclose = long[3] == 1
shortclose = short[3] == 1
//Alert
strategy.entry("short", strategy.short,qty = 1, when=short)
strategy.entry("long", strategy.long,qty=1, when=long)
plot(long,"long",color=green,linewidth=1)
plot(short,"short",color=red,linewidth=1)
strategy.close("long",when=longclose)
strategy.close("short",when=shortclose)
//strategy.exit(id="long",qty = 100000,when=longclose)
//strategy.exit(id="short",qty = 100000,when=shortclose)
plot(longclose,"close",color=blue,linewidth=1)
plot(shortclose,"close",color=orange,linewidth=1)
//strategy.exit(id="Stop", profit = 20, loss = 100)