This topic has not yet been rated - Rate this topic

Average True Range Formula

The average true range formula records the maximum values of the following three differences, and calculates the moving average of the resulting data series:

  • Between the previous day's high and low prices.

  • Between the previous day's close price and the current day's high price.

  • Between the previous day's close price and the current day's low price.

The average true range indicator is a good measure of commitment. A high value often indicates market bottom due to panic sell. A low value often indicates market top.

Syntax

Chart.DataManipulator.FinancialFormula(
    FinancialFormula.AverageTrueRange,
    "Period",
    "High,Low,Close",
    "ATR")

Parameters

This formula takes one optional parameter.

Period
Period for calculating the moving average of the true range values. The default value is 14.

Input Values

This formula takes one input Y value.

High
Daily high price.

Low
Daily low price.

Close
Daily close price.

Output Value

This formula outputs one Y value.

ATR
Average true range indicator.

The Line chart type is a convenient chart type to display the formula output.

The following example takes input from Series1's Y values for the daily high, low, and close prices (Series1:Y,Series1:Y2,Series1:Y4), and outputs the average true range indicator on Series3 (Series3:Y). It uses a period of 15 days to calculate the moving average of the true range values.

Chart1.DataManipulator.FinancialFormula (FinancialFormula.AverageTrueRange, "15", "Series1:Y,Series1:Y2,Series1:Y4", "Series3:Y");




Build Date:

2012-08-02
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.