Just an update on the previous script, of the same name, for greater clarity.
It works well if you need to identify if you need to stay "in" or "get-out" of a trade.
Also, a great thank you to all the great pine script programmers, who without them many of this would not be possible.