The code snippet you're referring to is simply there to remove the dot if no higher high than the high of the signal candle has been made in the candle following the signal candle => Invalidated Signal. This works well. What I'm trying to do is to make the code treat an invalidated signal like a "non-event", ie if the candle counter was already at 5 and a dot is drawn just to be removed at the next candle because it was invalidated, the counter shouldn't start over at 0 again but move on to 6, 7 etc. until it reaches 10 (the value where the condition is set to true again). This is the part that I don't manage to get to work.
Thanks

Comment