How to conditionally delete line in Pine Script
问题 I am attempting to create a TradingView study that draws a line from a crossunder on the current bar to a crossunder on a previous bar, where the previous bar is less than a set maximum number of bars back. I only want to draw lines with negative slopes (i.e. the previous crossunder happens at a higher value), and I also don't want multiple lines with the same starting point (no overlapping lines). I am able to draw the lines correctly, but I don't know how to delete lines when they overlap