
이 전략의 이름은 쌍 지수 이동 평균과 삼 지수 이동 평균 교차 전략 (Dual Exponential Moving Average and Triple Exponential Moving Average Crossover Strategy). 이 전략은 쌍 지수 이동 평균 (DEMA) 과 삼 지수 이동 평균 (TEMA) 의 교차 신호를 결합하여 DEMA와 TEMA의 골드 포크스 (Gold Forks) 를 통해 진출을 판단한다.
이 전략은 주로 쌍 지수 이동 평균 (DEMA) 과 삼 지수 이동 평균 (TEMA) 의 교차를 기반으로 거래 신호를 생성한다.
이중 지수 이동 평균 (DEMA) 의 계산 공식은 다음과 같다.
DEMA = 2*EMA1 - EMA2
그 중, EMA1과 EMA2는 각각 N의 길이주기의 기하급수적인 이동 평균이다. DEMA는 EMA의 부드러움과 응답의 신속성을 결합한다.
삼진 이동 평균 (TEMA) 의 계산 공식은 다음과 같다.
TEMA = 3*(EMA1 - EMA2) + EMA3
그 중, EMA1, EMA2 및 EMA3는 각각 N의 길이의 기간을 가진 기하급수적인 이동 평균이다. TEMA는 세 번의 지수를 매끄럽게 통과하여 가짜 돌파구를 필터링 할 수 있습니다.
DEMA 위쪽이 TEMA를 통과할 때, 구매 신호를 생성하고, DEMA 아래쪽이 TEMA를 통과할 때, 판매 신호를 생성한다. 쌍곡선 교차의 원칙에 따라, 주기 변환을 잡을 수 있으며, 출전시간에 들어갈 수 있다.
이 전략은 DEMA의 응답 속도와 TEMA의 파동 작용과 결합하여 쌍 지수 이동 평균과 삼 지수 이동 평균의 교차 형성 거래 신호를 통해 거래 정확도를 향상시킬 수 있습니다. 그러나 단일 지표 포괄은 착각에 취약하며, 시스템 거래 시스템을 형성하기 위해 여러 가지 검증 도구의 보조가 필요합니다.
/*backtest
start: 2023-12-03 00:00:00
end: 2024-01-02 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("DEMA-TEMA Cross Strategy", shorttitle="DEMA-TEMA Cross", overlay=true)
// Input options for Double EMA (DEMA)
dema_length = input.int(10, title="DEMA Length", minval=1)
dema_src = input(close, title="DEMA Source")
// Calculate Double EMA (DEMA)
dema_e1 = ta.ema(dema_src, dema_length)
dema_e2 = ta.ema(dema_e1, dema_length)
dema = 2 * dema_e1 - dema_e2
// Input options for Triple EMA (TEMA)
tema_length = input.int(8, title="TEMA Length", minval=1)
tema_src = input(close, title="TEMA Source")
// Calculate Triple EMA (TEMA)
tema_ema1 = ta.ema(tema_src, tema_length)
tema_ema2 = ta.ema(tema_ema1, tema_length)
tema_ema3 = ta.ema(tema_ema2, tema_length)
tema = 3 * (tema_ema1 - tema_ema2) + tema_ema3
// Crossover signals for long (small green arrow below candle)
crossover_long = ta.crossover(dema, tema)
// Crossunder signals for short (small red arrow above candle)
crossunder_short = ta.crossunder(dema, tema)
plotshape(crossunder_short ? 1 : na, title="Short Entry", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
plotshape(crossover_long ? -1 : na, title="Long Entry", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plot(dema, "DEMA", color=color.green)
plot(tema, "TEMA", color=color.blue)
if (crossover_long)
strategy.entry("Long", strategy.long)
if (crossunder_short)
strategy.entry("Short", strategy.short)