BUY up 50 Sel down 45
//Created by Magnesio study(title="CM_RSI_EMA", shorttitle="CM_RSI_EMA_", overlay=false) src = close, len = input(14, minval=1, title="RSI 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, title="RSI", style=line, linewidth=1, color=fuchsia) band1 = hline(79, title="Upper Line", linestyle=dashed, linewidth=1, color=gray) band0 = hline(21, title="Lower Line", linestyle=dashed, linewidth=1, color=gray) band2 = hline(50, title="Upper Line", linestyle=solid, linewidth=1, color=green) band3 = hline(45, title="Lower Line", linestyle=solid, linewidth=1, color=green) fill(band1, band0, color=purple, transp=90)