request for nmike.
study(title="Relative Strength Index", shorttitle="RSI") src = close, len = input(14, minval=1, title="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(rsi, style=columns, color=purple, histbase=50) band1 = hline(70) band0 = hline(30) fill(band1, band0, color=purple, transp=90)