TradingView
ZenAndTheArtOfTrading
10 Th09 2019 05:56

ATR Trailing Stop Indicator [Chart] 

AUD/JPYOANDA

Mô tả

I rely on this script for both my live trading and my backtesting process. I couldn’t live without it. It’s extremely simple – all it does is calculate your trailing stop price.

How It Works
The first number in blue is the current ATR (pips). The second number in green is your trailing stop loss price for Long trades, and the third number in red is your trailing stop loss price for Short trades.

For short trades, the stop loss price is calculated by adding the current ATR value to the highest-high of the given lookback period.

For long trades, the stop loss price is calculated by subtracting the current ATR value from the lowest-low of the given lookback period.

Settings
ATR Length:
ATR period (how many candles to include in the calculation).

Use Structure?
If set to true, the script will use swing lows and highs in its calculation. If set to false, the script will ignore swing lows and highs and give you the distance of the ATR from the current candle close instead.

How Far To Look Back For High/Lows:
Candle lookback period for swing high/lows.

ATR X ?:
This controls your ATR multiplier. For example, if you want to use a 2x ATR stop, set this to 2.

Tool Companion:
Here is the tool companion script for this indicator:

tradingview.com/script/xfAZD1ZW-ATR-Trailing-Stop-Indicator/

Source Code:
Go to zenandtheartoftrading.com/indicators/atr-trailing-stop-indicator/ for the source code – it’s free!

Phát hành các Ghi chú

-
- Updated script to remove deprecated "transp" parameters
- Add Table display for ATR to prevent scaling issues on the chart
- Tidied up interface a little more

Phát hành các Ghi chú

Updated to Pine Script v5
Bình luận
HisNomad
Brilliant, thanks a lot!
drp7936
Much appreciated along with the YouTube Vids... Thanks
ZenAndTheArtOfTrading
@drp7936, you're welcome drp! Good luck with your trading :)
Orph5781
@ZenAndTheArtOfTrading nice script! thanks! do you currently use default settings either for 15m or Daily? or depending on timeframe you select different values? thanks
ZenAndTheArtOfTrading
@Orph5781, Hi Orph, thanks! It really depends on the strategy I'm using, I have several strategies that trade different timeframes/markets and each of them typically have their own lookbacks/ATR multipliers etc depending on what I'm trying to achieve (ie my trend-following systems have wider stops, shorter-term systems have tight stops etc) - there's no 1-size-fits-all solution to a trailing stop really. But the default settings are a fine place to start for any market/timeframe if you're beginning your backtesting process
harshashivram01
how do i get subscription to this indicator?
i'm not able use any of your indicators please help me with this.
thank you.
Thêm nữa