Hi
i wrote a code to show overbought and oversold on the chart, but there is many signals on the chart so, i want to show trade signal when a reverse candle is printed on the chart how can i do this? i mean some kind of condition that says if overbought happened then signal the first bull candle
this is my code
rsiSource = input(title=RSI Source
, type=input.source, defval=close)
rsiLength = input(title=RSI Length
, type=input.integer, defval=14)
rsiOverbought = input(title=RSI Overbought Level
, type=input.integer, defval=65)
rsiOversold = input(title=RSI Oversold Level
, type=input.integer, defval=25)
rsiValue = rsi(rsiSource, rsiLength)
rsiOB = rsiValue >= rsiOverbought
rsiOS = rsiValue <= rsiOversold
plotshape(rsiOS, title=Long
, location=location.belowbar, color=color.green, style=shape.triangleup, text=OB
, size=size.small)
plotshape(rsiOB, title=Short
, location=location.abovebar, color=color.red, style=shape.triangledown, text=OS
, size=size.small)