dgmoon 已更新   
The related article is copyrighted material from Stocks & Commodities Jun 2009

This script has been originally edited by HPotter and Sylvain Vervoort

Some aspects have been modified and added such as:
  • ATR line color
    Alerts are added
    Fixed the inputs now can be adjusted with decimals without the keyboard.
    Securitys are added to the source
    Color bar is added
Quick Explain of ATR :
Average True Range (ATR) Trailing Stops
ATR Trailing Stops are primarily used to protect capital and lock in profits on individual trades but they can also be used, in conjunction with a trend filter, to signal entries.
Average True Range ("ATR") was introduced by J. Welles Wilder in his 1978 book New Concepts In Technical Trading Systems. ATR is a measure of volatility for a stock or index and is explained in detail at Average True Range. Wilder experimented with trend-following Volatility Stops using average true range. The system was subsequently modified to what is commonly known as ATR Trailing Stops.

ATR Trailing Stop Signals
Signals are used for exits:
Exit your long position (sell) when price crosses below the ATR trailing stop line.
Exit your short position (buy) when price crosses above the ATR trailing stop line.
While not conventional, they can also be used to signal entries — in conjunction with a trend filter.
**Source IncredibleCharts
Minor Changes
Lenght 16 - Multiplier x 2
Major changes in the code.
A second ATR with custom resolution is added
Remember to give thanks for the original essential formula to =
Sylvain Vervoort
Franklin Moormann
Minor changes
Major changes
After seeing that there is a certain margin of error when using the second frame .. "I don't know why" I have added individual adjustments to be able to compensate for the error, everything else remains the same
Minor changes


本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。