OPEN-SOURCE SCRIPT

ATR for Trailing Stop

The calculation of this ATR is based on the low of yesterday in order to not change continuously during the day.
You can use this indicator to create a trailing stop taking into account volatility on the nATRPeriod previous days.
It also always go up as a trailing stop should. It only goes down the price reaches the trailing stop.
ATRAverage True Range (ATR)stoptrailing

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer