d1s0c0beto

Espera de tendecia

FX:EURUSD   Euro / Đô la Mỹ
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)
Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.