트렌드 추적 최적화 이중 T3 지표 전략

T3 TOTT EMA OTT RSI
생성 날짜: 2025-01-17 14:29:51 마지막으로 수정됨: 2025-01-17 14:29:51
복사: 2 클릭수: 368
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

트렌드 추적 최적화 이중 T3 지표 전략

개요

이 전략은 Tillson T3 지표와 Twin Optimized Trend Follower(TOTT)를 기반으로 한 추세 추종 시스템입니다. 모멘텀 오실레이터인 윌리엄스 %R과 결합하여 거래 신호 생성을 최적화합니다. 이 전략은 별도의 매수 및 매도 매개변수 설정을 사용하는데, 이를 통해 다양한 시장 상황에 따라 민감도를 유연하게 조정하고 전략의 적응성을 향상시킬 수 있습니다.

전략 원칙

이 전략은 세 가지 핵심 요소로 구성됩니다.

  1. Tillson T3 지표 - 여러 EMA에 가중치를 두어 더 부드러운 추세선을 생성하는 최적화된 지수 이동 평균(EMA) 변형입니다.
  2. TOTT(Double Optimized Trend Tracker) - 매수 및 매도 조건에 대한 상단 및 하단 밴드를 계산하기 위해 가격 움직임과 변동성 계수를 적응적으로 조정하는 트렌드 추적 도구입니다.
  3. 윌리엄스 %R 지표 - 매수 과다 및 매도 과다 조건을 식별하는 데 사용되는 모멘텀 오실레이터입니다.

거래 신호 생성 논리:

  • 매수 조건: T3 라인이 상위 TOTT 트랙을 돌파하고 Williams %R이 -20보다 클 때(매도 과열)
  • 판매 조건 : T3 라인이 TOTT 하단 트랙 아래로 떨어지고 Williams %R이 -70보다 큰 경우

전략적 이점

  1. 강력한 신호 안정성 - T3 지표의 다중 평활화 처리를 통해 거짓 돌파의 위험이 효과적으로 감소됩니다.
  2. 우수한 적응성 - 매수 및 매도 매개변수를 분리하여 다양한 시장 상황에 맞게 독립적으로 최적화할 수 있습니다.
  3. 개선된 위험 제어 - Williams %R을 보조 확인으로 통합하여 거래 안정성을 개선합니다.
  4. 명확한 시각화 - 이 전략은 분석과 판단을 용이하게 하기 위해 포괄적인 차트 시각화 지원을 제공합니다.

전략적 위험

  1. 추세 반전 지연 - T3 지표의 다중 평활화로 인해 신호가 지연될 수 있음
  2. 변동이 심한 시장에는 적합하지 않습니다. 횡보 거래 중에 너무 많은 거래 신호가 생성될 수 있습니다.
  3. 높은 매개변수 민감도 - 매개변수는 다양한 시장 환경에 맞게 자주 조정되어야 함

위험 관리 제안:

  • 손절매 메커니즘 소개
  • 거래량 한도 설정
  • 추세 확인 필터 추가

전략 최적화 방향

  1. 동적 매개변수 최적화 - 적응형 매개변수 조정 메커니즘 개발
  2. 시장 맥락 인식 개선 - 추세 강도 지표 도입
  3. 위험 관리 개선 - 동적 손절매 및 이익 실현 추가
  4. 향상된 신호 필터링 - 확인을 위해 더 많은 기술적 지표 통합

요약하다

이는 완전한 구조와 명확한 논리를 갖춘 추세 추종 전략입니다. T3 지표와 TOTT를 결합하고 Williams %R로 필터링하면 추세 시장에서 좋은 성과를 보입니다. 어느 정도 지연이 있기는 하지만, 이 전략은 매개변수 최적화와 위험 관리 개선을 통해 좋은 실용적 가치와 확장 공간을 제공합니다.

전략 소스 코드
/*backtest
start: 2019-12-23 08:00:00
end: 2025-01-15 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/

//@version=6
strategy("FON60DK by leventsah", overlay=true)

// Girdi AL
t3_length = input.int(5, title="Tillson Per AL", minval=1)
t3_opt = input.float(0.1, title="Tillson Opt AL", step=0.1, minval=0)
tott_length = input.int(5, title="TOTT Per AL", minval=1)
tott_opt = input.float(0.1, title="TOTT Opt AL", step=0.1, minval=0)
tott_coeff = input.float(0.006, title="TOTT Coeff AL", step=0.001, minval=0)

//GİRDİ SAT
t3_lengthSAT = input.int(5, title="Tillson Per SAT", minval=1)
t3_optSAT = input.float(0.1, title="Tillson Opt SAT", step=0.1, minval=0)
tott_lengthSAT = input.int(5, title="TOTT Per SAT", minval=1)
tott_opt_SAT = input.float(0.1, title="TOTT Opt SAT", step=0.1, minval=0)
tott_coeff_SAT = input.float(0.006, title="TOTT Coeff SAT", step=0.001, minval=0)

william_length = input.int(3, title="William %R Periyodu", minval=1)

// Tillson T3 AL
t3(src, length, opt) =>
    k = 2 / (length + 1)
    ema1 = ta.ema(src, length)
    ema2 = ta.ema(ema1, length)
    ema3 = ta.ema(ema2, length)
    ema4 = ta.ema(ema3, length)
    c1 = -opt * opt * opt
    c2 = 3 * opt * opt + 3 * opt * opt * opt
    c3 = -6 * opt * opt - 3 * opt - 3 * opt * opt * opt
    c4 = 1 + 3 * opt + opt * opt * opt + 3 * opt * opt
    t3_val = c1 * ema4 + c2 * ema3 + c3 * ema2 + c4 * ema1
    t3_val

t3_value = t3(close, t3_length, t3_opt)
t3_valueSAT = t3(close, t3_lengthSAT, t3_optSAT)


// TOTT hesaplaması (Twin Optimized Trend Tracker)
Var_Func(src, length) =>
    valpha = 2 / (length + 1)
    vud1 = math.max(src - src[1], 0)
    vdd1 = math.max(src[1] - src, 0)
    vUD = math.sum(vud1, 9)
    vDD = math.sum(vdd1, 9)
    vCMO = (vUD - vDD) / (vUD + vDD)
    var float VAR = na
    VAR := valpha * math.abs(vCMO) * src + (1 - valpha * math.abs(vCMO)) * nz(VAR[1], src)
    VAR

VAR = Var_Func(close, tott_length)
VAR_SAT = Var_Func(close, tott_lengthSAT)

//LONG 
MAvg = VAR
fark = MAvg * tott_opt * 0.01
longStop = MAvg - fark
longStopPrev = nz(longStop[1], longStop)
longStop := MAvg > longStopPrev ? math.max(longStop, longStopPrev) : longStop
shortStop = MAvg + fark
shortStopPrev = nz(shortStop[1], shortStop)
shortStop := MAvg < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStop
dir = 1
dir := nz(dir[1], dir)
dir := dir == -1 and MAvg > shortStopPrev ? 1 : dir == 1 and MAvg < longStopPrev ? -1 : dir
MT = dir == 1 ? longStop : shortStop
OTT = MAvg > MT ? MT * (200 + tott_opt) / 200 : MT * (200 - tott_opt) / 200
OTTup = OTT * (1 + tott_coeff)
OTTdn = OTT * (1 - tott_coeff)

//CLOSE
MAvgS = VAR_SAT
farkS = MAvgS * tott_opt_SAT * 0.01
longStopS = MAvgS - farkS
longStopPrevS = nz(longStopS[1], longStopS)
longStopS := MAvgS > longStopPrevS ? math.max(longStopS, longStopPrevS) : longStopS
shortStopS = MAvgS + farkS
shortStopPrevS = nz(shortStopS[1], shortStopS)
shortStopS := MAvgS < shortStopPrevS ? math.min(shortStopS, shortStopPrevS) : shortStopS
dirS = 1
dirS := nz(dirS[1], dirS)
dirS := dirS == -1 and MAvgS > shortStopPrevS ? 1 : dirS == 1 and MAvgS < longStopPrevS ? -1 : dirS
MTS = dirS == 1 ? longStopS : shortStopS
OTTS = MAvgS > MTS ? MTS * (200 + tott_opt_SAT) / 200 : MTS * (200 - tott_opt_SAT) / 200
OTTupS = OTTS * (1 + tott_coeff_SAT)
OTTdnS = OTTS * (1 - tott_coeff_SAT)

// Calculation of Williams %R
williamsR = -100 * (ta.highest(high, william_length) - close) / (ta.highest(high, william_length) - ta.lowest(low, william_length))

// Alım koşulu
longCondition = (t3_value > OTTup) and (williamsR > -20)

// Short koşulu (long pozisyonunu kapatmak için)
shortCondition = (t3_valueSAT < OTTdnS) and (williamsR > -70)

// Alım pozisyonu açma
if (longCondition)
    strategy.entry("Long", strategy.long)

// Short koşulu sağlandığında long pozisyonunu kapama
if (shortCondition)
    strategy.close("Long")


// Alım pozisyonu boyunca barları yeşil yapma
barcolor(strategy.position_size > 0 ? color.green : na)

// Grafikte göstergeleri çizme
plot(t3_value, color=color.blue, linewidth=1, title="Tillson AL")
plot(OTTup, color=color.green, linewidth=1, title="TOTT Up AL")
plot(OTTdn, color=color.red, linewidth=1, title="TOTT Down AL")

// Grafikte göstergeleri çizme
plot(t3_valueSAT, color=color.blue, linewidth=1, title="Tillson SAT")
plot(OTTupS, color=color.green, linewidth=1, title="TOTT Up SAT")
plot(OTTdnS, color=color.red, linewidth=1, title="TOTT Down SAT")