I want to remove some lines drawn on the chart by my script conditionally but I'm having trouble sequencing them.
I suppose that to have all the lines 'tags' arranged in sequence one after the other, it is enough to use the same 'tag' start plus 'CurrentBar' regardless of the 'Draw.Line' method being in different conditions.
In my script, I try to unify the 'tags' in the same index with ' "lA"+(CurrentBar) ' as stated above. However, as I do so, some lines disappear, this is not the result I want.
It is the case that the 'Draw.Line' methods are in separate conditions. Is that the problem?
I need to merge the lines in the same index because I will conditionally remove the previous line in function of the current one.
When I do this with separate tags (' "lA"+(CurrentBar) ' and ' "lB"+(CurrentBar) ') everything works fine but there are still some lines to be removed and the reason is that the tags are not unified in the same index.
Is there any way to merge the lines in an index with different tags but in the correct order, and still remove them with the 'RemoveDrawObject' method?

Comment