FX:EURUSD   유로 / 미국 달러
study("TDI - Traders Dynamic Index ", shorttitle="TDINueva")

rsiPeriod = input(14, minval = 1, title = "RSI Period")
kPeriod = input(8, minval = 1, title = "K Period")
smoothK = input(5, minval = 1, title = "Smooth K")
smoothD = input(3, minval = 1, title = "Smooth D")

src = input(hlc3, title="Source")
rsi = rsi(src, rsiPeriod)
rsiMax = highest(rsi, kPeriod)
rsiMin = lowest(rsi, kPeriod)
stochK = sma(sma((rsi - rsiMin) / (rsiMax - rsiMin) * 100, smoothK), smoothK)
stochD = sma(stochK, smoothD)

bandLength = input(31, minval = 1, title = "Band Length")
lengthrsipl = input(1, minval = 0, title = "Fast MA on RSI")
lengthtradesl = input(9, minval = 1, title = "Slow MA on RSI")

ma = sma(stochD, bandLength)
offs = (1.6185 * stdev(stochD, bandLength))
up = ma + offs
dn = ma - offs
mid = (up + dn) / 2

fastMA = sma(stochD, lengthrsipl)
slowMA = sma(stochD, lengthtradesl)

hline(30)
hline(50)
hline(70)

upl = plot(up, "Upper Band", color = blue)
dnl = plot(dn, "Lower Band", color = blue)
midl = plot(mid, "Middle of Bands", color = orange, linewidth = 2)

plot(slowMA, "Slow MA", color=green, linewidth=2)
plot(fastMA, "Fast MA", color=red, linewidth=2)

fill(upl, midl, purple, transp=90)
fill(midl, dnl, green, transp=90)
면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.