millerrh

Trailing ATR Stops

millerrh Updated   
This script plots a trailing stop of the ATR multiplied by a user-defined number. Since it is meant to be used as a trailing stop, the value doesn't fluctuate with the price as a normal ATR indicator does, but stays fixed unless price moves away from it. In that case it follows the price. If price crosses the stop level, it resets itself based on current price and starts trailing all over again.

User Settings:

  • Support - Use for a trailing stop while long
  • Resistance - Use for a trailing stop while short
  • Both - Acts like a channel and can spot periods of lower volatility
Release Notes:
Giving additional credit to @SimpleCryptoLife as it seems like some of the code is similar to one of his indicators. Was an unintentional omission.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?