Average True Range

The True Range indicator is defined by Wilder to be the greatest of the following for each period:

  • The distance from today's high to today's low.
  • The distance from yesterday's close to today's high.
  • The distance from yesterday's close to today's low.

The Average True Range is simply the average of the true ranges over the past x periods (where x is specified by the user).

Syntax:

Public Function AverageTrueRange(ByVal HLOCV()() As Double, ByVal Lag As Long) As Double

Parameters:

  • ByVal HLOCV()() As Double
  • ByVal Lag As Long

Back to list

 

Example:

 

    Dim TA4Net As New TA4Net.CTAFunctions("YOUR-REGISTRATION-CODE")

    Dim Result() As Double

    Dim HLOCV(,) As Double

 

 

    ' loading values to array

    HLOCV = GetHLOCVValues()

    ' calculating Technical Analysis function

    Result = TA4Net.AverageTrueRange(HLOCV, 14)

 


TA4.NET® Franz AG 2004©
Web site: http://www.ta4.net
e-mail: support@ta4.net

Browser Based Help. Published by chm2web software.