is it possible in v10.3 to remove a horizontal line previously drawn by my code and then draw it again in a new place? I have to take into account that lines from highs to lows also on the chart should remain
It is not possible to remove objects previously drawn. But you can make your code plotting once and only on the last candle, this way on each new candlestick, the code is plotting again all objects at the same place or different ones depending of your calculation and settings.
at the top of your code then only drawn object that are drawn on the latest bar are shown.
Sometimes it is necessary to create two indicators rather than one and then apply them both. One can draw on the last bar only and the other can draw on all bars.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.