RSI w/ three bands.
Input box for third band value.
Input box for third band value.
study(title="Relative Strength Index with third band", shorttitle="RSI 3band") src = close, len = input(14, minval=1, title="Length") band2pos = input(50.0, type=float, title="third rsi band", minval=1, maxval=100) 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, color=purple) band1 = hline(70) band0 = hline(30) band2 = hline(band2pos) fill(band1, band0, color=purple, transp=90)