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.
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?
//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)