A screenshot-friendly indicator: an arrow and an alert whenever RSI crosses back above 30. Traders wire it to notifications and wonder why the alerts don't match the arrows they remember seeing.
//@version=6
indicator("RSI reversal signal", overlay = true)
r = ta.rsi(close, 14)
buy = ta.crossover(r, 30)
alertcondition(buy, "Buy", "RSI crossed up through 30")
plotshape(buy, style = shape.triangleup, location = location.belowbar, color = color.green)Possible repaint: a signal/alert is derived from the still-forming bar with no barstate.isconfirmed gate — it can flip before the bar closes.
Our engine flags a repaint. The signal is evaluated on the still-forming bar with no barstate.isconfirmed gate, so mid-bar the RSI can cross above 30 (firing the arrow and the alert) and then fall back before the bar closes — the arrow vanishes from history, but the alert already fired. That is the textbook mismatch between what you see on the chart and what actually triggered. Gating the signal with 'and barstate.isconfirmed' makes it fire only on closed bars, so the marker and the alert agree.
Code-correctness analysis only — not financial advice, and not a measure of profitability. The code shown is a representative community pattern, not any specific author's script. Trading involves substantial risk of loss.