RSI CAPITAL CRYPTO//@version=5
indicator("RSI with Arrows", overlay=true)
// Configuração do RSI
rsiLength = 14
rsiSource = close
rsiValue = ta.rsi(rsiSource, rsiLength)
// Condições para as setas
arrowDown = rsiValue > 85
arrowUp = rsiValue < 20
// Plotando setas no gráfico
plotshape(arrowDown, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, text="↓")
plotshape(arrowUp, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, text="↑")
// Plotando o RSI
hline(80, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)
plot(rsiValue, "RSI", color=color.blue)