| Volatility Based > Average True Range [Indicators] Article/Author: Omega Research Inc., 1997
Download: ATR.ELA
Category: Indicator > Volatility Based
Description:
True Range measures the conventional range of a bar but checks the previous bars closing price to see if it is outside the current bars range. If it is, then that closing price is used instead of the high or low. That is, the previous bars close is considered part of the current bars range. This helps account for gaps between bars. The Average True Range indicator calculates and plots the average of these values over a certain number of bars.
Usage:
This indicator may be considered a tool for measuring the volatility of a market using a price range concept. Often, extremes in Average True Range are associated with a change in character of a market, from trending to trading range and vice versa.

Inputs:
Length - Number of bars used to calculate the Average True Range
EasyLanguage Code:INPUT: LENGTH(14);
PLOT1(AVGTRUERANGE(LENGTH), "AVGTRUERANGE");
{ALERT CRITERIA}
IF PLOT1 > HIGHEST(PLOT1, 20)[1] THEN
ALERT("A NEW "+ NUMTOSTR(LENGTH, 0)+" BAR HIGH HAS BEEN MADE")
ELSE
IF PLOT1 < LOWEST(PLOT1, 20)[1] THEN
ALERT("A NEW "+ NUMTOSTR(LENGTH, 0)+" BAR LOW HAS BEEN MADE"); |