WebCab Technical Analysis Web Services for Delphi v1.1

DirectionalMovementIndicator.TrueRangePeriod Method 

True Range (TR) of a traded asset over a number of periods.

public double[] TrueRangePeriod(
   double[] highs,
   double[] lows,
   double[] closing
);

Parameters

highs
A double array where a first term contains the value of the highest traded price during the last trading period considered, the second terms contains the highest traded price in the previous trading periods and on so.
lows
A double array where a first term contains the value of the lowest traded price during the last trading period considered, the second terms contains the lowest traded price in the previous trading periods and on so.
closing
A double array where a first term contains the value of the closing price during the last trading period considered, the second terms contains the closing price in the previous trading periods and on so.

Return Value

An array where the k-term corresponds to the True Range (TR) on the k-th previous period.

Remarks

This method is a convenient means by which you are able to apply TrueRange over a number of consecutive periods.

Exceptions

Exception TypeCondition
ArgumentExceptionThrown if the length of the array parameters high, low or closing, is not the same or if any elements of any one of these array's has a negative element.

See Also

DirectionalMovementIndicator Class | Indicators Namespace | TrueRange - Evaluate the True Range over a single period.