With ATR Levels plotted on the price chart itself, you can better set your based trailing Stop Loss.
Also helps to define the SL when making an entry into a stock.
This indicator is supposed to be used on Daily and Weekly Charts.
For other timeframes you would need to tweek the default parameters.
Also added an option of a Simple Moving Average for taking better decisions.
Check the indicator settings to get a complete idea of what is possible.
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.