
이 전략은 트리플 인덱스 이동 평균 (TEMA) 과 피셔 트랜스폼 (Fisher Transform) 을 결합하여 트렌드 및 동력 신호를 식별하여 진입 및 출퇴근 시간을 결정한다. TEMA는 낮은 지연의 트렌드 추적 지표로서 시장의 트렌드 방향을 효과적으로 식별 할 수 있으며, 피셔 트랜스폼은 가격 변화를 고스 정형 분포로 변환하여 더 명확한 동력 신호를 제공합니다. 전략은 트렌드 추적과 동력 분석의 장점을 결합하여 거래 촉발 조건으로 교차 신호를 사용합니다.
이 전략의 핵심 논리는 두 가지 주요 지표에 기초하고 있습니다.
거래 규칙은 다음과 같습니다.
이것은 트렌드 및 동력 분석을 결합한 완전한 거래 전략이며, TEMA와 Fisher Transform의 결합된 사용으로 트렌드 추적 능력을 보장하고 명확한 동력 확인 신호를 제공합니다. 전략은 합리적으로 설계되어 있으며, 실용성이 좋습니다. 그러나 실제 응용에서는 시장 환경에 대한 적응성에 주의를 기울이고 특정 상황에 따라 매개 변수를 최적화해야합니다. 제안된 최적화 방향을 통해 전략의 안정성과 신뢰성이 더욱 향상 될 수 있습니다.
/*backtest
start: 2024-02-21 00:00:00
end: 2025-02-19 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Triple EMA (TEMA) + Fisher Transform Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// ==== Triple EMA (TEMA) Settings ====
temaLength = input.int(21, title="TEMA Length", minval=1)
// Implementácia Triple EMA (TEMA)
// TEMA = 3 * EMA(close, length) - 3 * EMA(EMA(close, length), length) + EMA(EMA(EMA(close, length), length), length)
ema1 = ta.ema(close, temaLength)
ema2 = ta.ema(ema1, temaLength)
ema3 = ta.ema(ema2, temaLength)
tema = 3 * ema1 - 3 * ema2 + ema3
plot(tema, color=color.blue, title="TEMA")
// ==== Fisher Transform Settings ====
fisherLength = input.int(10, title="Fisher Length", minval=1)
fisherSmooth = input.int(1, title="Fisher Smoothing", minval=1) // Zvyčajne sa používa 1 alebo 2
// Výpočet Fisher Transform
// Krok 1: Normalizácia ceny
price = (high + low) / 2
maxPrice = ta.highest(price, fisherLength)
minPrice = ta.lowest(price, fisherLength)
value = 0.5 * (2 * ((price - minPrice) / (maxPrice - minPrice)) - 1)
value := math.min(math.max(value, -0.999), 0.999) // Orezanie hodnoty pre stabilitu
// Krok 2: Výpočet Fisher Transform
var float fisher = na
fisher := 0.5 * math.log((1 + value) / (1 - value)) + 0.5 * nz(fisher[1])
fisher := fisherSmooth > 1 ? ta.sma(fisher, fisherSmooth) : fisher
plot(fisher, color=color.red, title="Fisher Transform", linewidth=2)
// ==== Strategie Podmienky ====
// Long Condition: Cena prekročí TEMA smerom nahor a Fisher Transform prekročí 0 smerom nahor
longCondition = ta.crossover(close, tema) and ta.crossover(fisher, 0)
if (longCondition)
strategy.entry("Long", strategy.long)
// Short Condition: Cena prekročí TEMA smerom nadol a Fisher Transform prekročí 0 smerom nadol
shortCondition = ta.crossunder(close, tema) and ta.crossunder(fisher, 0)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Exit Long Condition: Cena prekročí TEMA smerom nadol alebo Fisher Transform prekročí 0 smerom nadol
exitLong = ta.crossunder(close, tema) or ta.crossunder(fisher, 0)
if (exitLong)
strategy.close("Long")
// Exit Short Condition: Cena prekročí TEMA smerom nahor alebo Fisher Transform prekročí 0 smerom nahor
exitShort = ta.crossover(close, tema) or ta.crossover(fisher, 0)
if (exitShort)
strategy.close("Short")
// ==== Voliteľné: Vykreslenie Zero Line pre Fisher Transform ====
hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dotted)