RSISto Indicator script

//version=4
study(title="Stochastic", shorttitle="RSISto", format=format.price, precision=2, resolution="")







length1 = input(21, minval=1), smoothK1 = input(3, minval=1), smoothD1 = input(3, minval=1)
length2 = input(5, minval=1), smoothK2 = input(1, minval=1), smoothD2 = input(1, minval=1)
k1 = sma(stoch(close, high, low, length1), smoothK1)
d1 = sma(k1, smoothD1)
plot(k1, color=#C0C0C0)
plot(d1, color=#C0C0C0)
k2 = sma(stoch(close, high, low, length2), smoothK2)
d2 = sma(k2, smoothD2)
plot(k2, color=#C0C0C0)
plot(d2, color=#C0C0C0)
h0 = hline(80)
h1 = hline(20)
h2 = hline(95)
h3 = hline(5)
h4 = hline(50)



src = close, len = input(14, minval=1, title="Length")
avgLen = input(7, minval=1, title="Avg. Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
plot(sma(rsi+100, avgLen), color=#C0C0C0)
plot(rsi+100, color=#C0C0C0)

band1 = hline(170)
band0 = hline(130)
fill(band1, band0, color=#C0C0C0, transp=90)
Technical Indicators

Отказ от ответственности