이 전략은 다중 시간 프레임 이동 평균의 교차를 사용하여 거래 신호를 판단한다. 이 전략은 현재 시간 프레임에서 더 긴 시간 프레임의 이동 평균을 관찰하여 더 큰 경향 방향을 발견 할 수 있다.
이 전략은 두 개의 이동 평균을 사용하며, 현재 주기 및 더 높은 주기에서 각각 계산된다.
예를 들어 15분 차트에서 20일선과 50일선을 계산하면:
15분 20일 선에서 50일 선을 통과할 때, 더 많이 하고, 15분 20일 선 아래 50일 선을 통과할 때, 공백을 하라.
이것은 현재 주기에서 더 긴 주기적 추세를 관찰하는 효과를 달성한다. 전략은 또한 이동 평균의 주기적 길이를 사용자 정의 할 수 있습니다.
교차 신호 지점은 거래를 상기시키기 위해 점 모양의 표시를 표시할 수도 있다.
위험은 다음과 같이 줄일 수 있습니다.
더 긴 고 주기 평균을 유지하여 주 트렌드를 올바르게 판단하십시오.
다른 기술 지표에 추가된 추가 필터링 신호
최적의 조합으로 평선 주기 변수를 최적화
K-Line 형식을 추가하는 것과 같은 적절한 입학 조건의 용이함
이 전략은 다음과 같은 부분에서 개선될 수 있습니다.
다른 주기의 조합은 다른 품종에 가장 잘 어울리는 조합을 가지고 있습니다.
예를 들어, MACD 지표의 흐름을 교차할 때 확인합니다.
PostForm123의 부가적인 증거에 따라 탈퇴를 결정할 수 있습니다.
짧은 사이클은 더 엄격한 필터링 조건을 적용하고, 긴 사이클은 더 느슨한 조건을 적용합니다.
다른 시기의 시장 특성이 다르기 때문에 변수를 최적화 할 수 있습니다.
이 전략은 다중 시간 프레임 평행선의 교차를 관찰하여 트렌드 방향을 판단하여 더 큰 수준의 트렌드를 발견한다. 이것은 단기 잡음, Focus123123의 더 큰 시조를 효과적으로 제거할 수 있다. 그러나 또한 주기 설정의 어려움, 트렌드 판단 지연 등의 문제가 있다. 우리는 엄격한 피드백을 통해 최적화 파라미터 조합을 추가하고 다른 지표에 필터링 Confirmation123를 추가하여 123123123을 개선할 수 있다. 동시에, 시장 피드백에 따라 전략 시스템을 지속적으로 수정하고 개선하여 더 안정적이고 신뢰할 수 있도록 실장 검증이 필요합니다.
/*backtest
start: 2022-09-14 00:00:00
end: 2023-09-20 00:00:00
period: 7d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
//Run script on a long interval gives better result for e.g. 1 Day
//Plots The Majority of Moving Averages
//Defaults to Current Chart Time Frame --- But Can Be Changed to Higher Or Lower Time Frames
//2nd MA Capability with Show Crosses Feature
//study(title="CM_Ultimate_MA_MTF", shorttitle="CM_Ultimate_MA_MTF", overlay=true)
strategy("Stratergy CM_Ultimate_MA_MTF", shorttitle = "Stratergy CM_Ultimate_MA_MTF", overlay = true)
//,default_qty_type = strategy.percent_of_equity, default_qty_value=100.0, pyramiding=0)
//inputs
src = close
useCurrentRes = input(true, title="Use Current Chart Resolution?")
resCustom = input(title="Use Different Timeframe? Uncheck Box Above", defval="D")
len = input(20, title="Moving Average Length - LookBack Period")
atype = input(1,minval=1,maxval=7,title="1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA")
cc = input(true,title="Change Color Based On Direction?")
smoothe = input(2, minval=1, maxval=10, title="Color Smoothing - 1 = No Smoothing")
doma2 = input(false, title="Optional 2nd Moving Average")
len2 = input(50, title="Moving Average Length - Optional 2nd MA")
atype2 = input(1,minval=1,maxval=7,title="1=SMA, 2=EMA, 3=WMA, 4=HullMA, 5=VWMA, 6=RMA, 7=TEMA")
cc2 = input(true,title="Change Color Based On Direction 2nd MA?")
warn = input(false, title="***You Can Turn On The Show Dots Parameter Below Without Plotting 2nd MA to See Crosses***")
warn2 = input(false, title="***If Using Cross Feature W/O Plotting 2ndMA - Make Sure 2ndMA Parameters are Set Correctly***")
sd = input(false, title="Show Dots on Cross of Both MA's")
res = useCurrentRes ? timeframe.period : resCustom
//hull ma definition
hullma = wma(2*wma(src, len/2)-wma(src, len), round(sqrt(len)))
//TEMA definition
ema1 = ema(src, len)
ema2 = ema(ema1, len)
ema3 = ema(ema2, len)
tema = 3 * (ema1 - ema2) + ema3
avg = atype == 1 ? sma(src,len) : atype == 2 ? ema(src,len) : atype == 3 ? wma(src,len) : atype == 4 ? hullma : atype == 5 ? vwma(src, len) : atype == 6 ? rma(src,len) : tema
//2nd Ma - hull ma definition
hullma2 = wma(2*wma(src, len2/2)-wma(src, len2), round(sqrt(len2)))
//2nd MA TEMA definition
sema1 = ema(src, len2)
sema2 = ema(sema1, len2)
sema3 = ema(sema2, len2)
stema = 3 * (sema1 - sema2) + sema3
avg2 = atype2 == 1 ? sma(src,len2) : atype2 == 2 ? ema(src,len2) : atype2 == 3 ? wma(src,len2) : atype2 == 4 ? hullma2 : atype2 == 5 ? vwma(src, len2) : atype2 == 6 ? rma(src,len2) : tema
out = avg
out_two = avg2
out1 = security(syminfo.tickerid, res, out)
out2 = security(syminfo.tickerid, res, out_two)
ma_up = out1 >= out1[smoothe]
ma_down = out1 < out1[smoothe]
col = cc ? ma_up ? lime : ma_down ? red : aqua : aqua
col2 = cc2 ? ma_up ? lime : ma_down ? red : aqua : aqua
circleYPosition = out2
chk=col==red?1:0
if (not na(chk))
if (chk[1]==1 and chk==0)
strategy.entry("RsiLE", strategy.long, comment="RsiLE")
else
strategy.exit("RsiLE")
if (chk[1]==0 and chk==1)
strategy.entry("RsiSE", strategy.short, comment="RsiLE")
else
strategy.exit("RsiSE")
plot(out1, title="Multi-Timeframe Moving Avg", style=line, linewidth=4, color = col)
plot(doma2 and out2 ? out2 : na, title="2nd Multi-TimeFrame Moving Average", style=circles, linewidth=4, color=col2)
plot(sd and cross(out1, out2) ? circleYPosition : na,style=cross, linewidth=5, color=yellow)