AvgTrueRange (Function)

image\trumpet2.gif Disclaimer

The AvgTrueRange function calculates the average of the TrueRange for some number of bars.

Syntax

AvgTrueRange(Length)

Returns (Double)

A numeric value containing the average TrueRange over some number of bars.

Parameters

Name Type Description
Length Numeric Sets the number of bars to consider for the average true range.

Remarks

AvgTrueRange is used to smooth out price bars with volatility that is higher or lower than normal.

TrueRange is defined as the larger of the following:

  • The distance between today’s High and today's Low.

  • The distance between today’s High and yesterday's Close.

  • The distance between today’s Low and yesterday's Close.

The value for the Length input parameter should always be a positive whole number greater than 0.

Example

Assigns to Value1 the 10 bar average of the TrueRange for each bar, then plots the result:

Value1 = AvgTrueRange(10);

Plot1(Value1, "AvgTRng");

Reference

Wilder, J. Welles, Jr. New Concepts in Technical Trading Systems (Greensboro, NC: Trend Research, 1978).