1
study(title="KRACH", shorttitle="KRACH") src = close, len = input(6, 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, color=purple) band1 = hline(70) band0 = hline(30) fill(band1, band0, color=purple, transp=90) src1 = close, len1 = input(9, minval=1, title="Length") up1 = rma(max(change(src1), 0), len1) down1 = rma(-min(change(src1), 0), len1) rsi1 = down1 == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up1 / down1)) plot(rsi1, color=red) band11 = hline(70) band01 = hline(30) fill(band1, band0, color=purple, transp=90) src23 = close, len23 = input(18, minval=1, title="Length") up23 = rsi(max(change(src23), 0), len23) down23 = rsi(-min(change(src23), 0), len23) rsi23 = down23 == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up23 / down23)) plot(rsi23, color= orange) band123 = hline(70) band023 = hline(30) fill(band1, band0, color=yellow, transp=90)