i posted this somewhere else but i presume this is the right place. i believe some of you can be interested in the following code which i defined mainly for exits when price goes below it, though it can also be used to veto a new entry if at that time price is below it. it can be made more sophisticated and/or used in conjunction with other indicators but still as it is i find it very useful. in any case improvement suggestions are welcome.
just for the record, instead of ATR for a volatility measure, Implied Volatility is a possibility which can be used as a substitute or in conjunction with ATR. the only problem is that unfortunately TOS has some flaws on many underlings when plotting IV so it is not a reliable option imho.
parameters can be adjusted to make it more or less tolerant with price movement.