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.
Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?
//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)