I'm trying to detect the if each candle is the lowest value, checking 5 previous candles lows and 5 next candles lows
I found no problem with previous:
if ta.lowest(low, 5) == low
line.new(bar_index - 1, low, bar_index + 1, low, color = color.red, width = 1)
To evaluate if current canle is lower than next ones, I've tried to use negative value on "ta.lowest(low, -5)" but it does not work. Can you give me a hand?