Try this code
//@version=5
indicator(title=“LIT Entry Helper”, shorttitle=“LIT Entry Helper”, format=format.price, precision=2, timeframe=“”, timeframe_gaps=true)
ma(source, length, type) =>
switch type
“SMA” => ta.sma(source, length)
“EMA” => ta.ema(source, length)
rsiLengthInput = input.int(50, minval=1, title=“Price Equalibrium”, group=“RSI Settings”)
rsiSourceInput = input.source(close, “Source”, group=“RSI Settings”)
maTypeInput = input.string(“SMA”, title=“MA Type”, options=[“SMA”, “EMA”], group=“MA Settings”)
maLengthInput = input.int(60, title=“Liquid Equalibrium”, group=“MA Settings”)
up = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput)
down = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput)
rsi = down == 0 ? 100 : 100 / (1 + up / down)
rsiMA = ma(rsi, maLengthInput, maTypeInput)
plot(rsi, “Price Equalibrium”, color=color.purple, linewidth=2)
plot(rsiMA, “Liquid Equalibrium”, color=color.black, linewidth=2)
//rsiUpperBand = hline(70, “RSI Upper Band”, color=color.gray)
hline(50, “Middle Band”, color=color.new(color.gray, 50))
//rsiLowerBand = hline(30, “RSI Lower Band”, color=color.gray)