netixen

Daily ATR%

If You are using a percentage of the Daily Average True Range in determining your stop placement,
this quick indicator is for You.


excerpt from investopedia.com/articles/trading/06/stopplacement.asp
ATR % Stop Method
The ATR% stop method can be used by any type of trader because the width of the stop is determined by the percentage of average true range (ATR). ATR is a measure of volatility over a specified period of time. The most common length is 14, which is also a common length for oscillators such as the relative strength index (RSI) and stochastics. A higher ATR indicates a more volatile market, while a lower ATR indicates a less volatile market. By using a certain percentage of ATR, you ensure that your stop is dynamic and changes appropriately with market conditions.

For example, for the first four months of 2006, the GBP/USD average daily range was around 110 to 140 pips. A day trader may want to use a 10% ATR stop - meaning that the stop is placed 10% x ATR pips from the entry price.In this instance, the stop would be anywhere from 11 to 14 pips from your entry price. A swing trader might use 50% or 100% of ATR as a stop. In May and June of 2006, daily ATR was anywhere from 150 to 180 pips. As such, the day trader with the 10% stop would have stops from entry of 15 to 18 pips while the swing trader with 50% stops would have stops of 75 to 90 pips from entry.
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?
//Created By netixen on 4-14-2015
study(title="Daily ATR%", shorttitle="DATR%", overlay=false)

// Inputs
length = input(14, minval=1)
iPercent = input(30, minval=1, maxval=99, title="Percentage, What % of ATR to plot.")

// Logic
percentage = iPercent * 0.01
datr = security(tickerid, "1D", sma(tr, length))
datrp = datr * percentage

// View
plot(datrp, color=red, offset = 1)