커뮤니티
수식 부탁합니다.
안녕하세요.
수식 변환 작업 부탁합니다.
//Parameters required
fastEmaPeriod = input(5, minval=1, title="Fast TEMA")
slowEmaPeriod = input(20, minval=1, title="Slow TEMA")
triple_ema(src, time_period) =>
ema1 = rsi(src, time_period)
ema2 = rsi(ema1, time_period)
ema3 = rsi(ema2, time_period)
TEMA_cal = 0.0
TEMA_cal := 3 * (ema1 - ema2) + ema3
TEMA_cal
//
fastTEMA = triple_ema(high,fastEmaPeriod)
slowTEMA = triple_ema(low,slowEmaPeriod)
plot(fastTEMA, title = 'fast TEMA',color=color.blue, linewidth=2)
plot(slowTEMA, title = 'slow TEMA',color=color.red, linewidth=2)
//
showZones = input(true, title="Show Bullish/Bearish Zones")
// bullish signal rule:
bullishRule = fastTEMA >= slowTEMA
// bearish signal rule:
bearishRule = fastTEMA <= slowTEMA
// current trading State
ruleState = 0
ruleState := bullishRule ? 1 : bearishRule ? -1 : nz(ruleState[1])
bgcolor(showZones ? ruleState == 1 ? color.lime : ruleState == -1 ? color.red : color.yellow : na, title=" Bullish/Bearish Zones", transp=90)
//
답변 1
예스스탁 예스스탁 답변
2026-02-03 10:25:38