Understood now what is the advantage of currentbar!
My questions to different kind of drawing were because I try to simulate the chart-trader in my scripts (draw line for entry and initial stop, remove line of initial stop once...and draw a new line with stopvariable1........)
Thank you guys for your help and thank you koganam for your clear explanation.
Have a great weekend!
Tony

How you make your tags unique is up to you. As every bar can have only one identifying value as to its count in the chart, using CurrentBar simply guarantees that the tag will be unique, and removes the need to think and remember what tags have already been used, so as to avoid reusing them or otherwise ensure uniqueness.
I was simply explaining why the way that you had written your code was producing the results that you were seeing, not telling you that you need to ensure uniqueness in any particular way.
Leave a comment: