| Overloads | |
|---|---|
| TrueRange(int, int, double[], double[], double[]) | Calculates the True Range (TRANGE) indicator. |
| TrueRange(int, int, float[], float[], float[]) | Calculates the True Range (TRANGE) indicator using float arrays. |
Calculates the True Range (TRANGE) indicator.
public static TechnicalAnalysis.Functions.TrueRangeResult TrueRange(int startIdx, int endIdx, double[] high, double[] low, double[] close);startIdx System.Int32
The starting index for the calculation.
endIdx System.Int32
The ending index for the calculation.
high System.Double[]
An array of high prices.
low System.Double[]
An array of low prices.
close System.Double[]
An array of closing prices.
TrueRangeResult
A TrueRangeResult object containing the calculated values.
True Range is the greatest of the following: - Current high minus current low - Absolute value of current high minus previous close - Absolute value of current low minus previous close
True Range captures volatility from gaps and limit moves. It is a component of the Average True Range (ATR) indicator. Unlike the traditional range calculation, True Range accounts for gaps between trading sessions.
Calculates the True Range (TRANGE) indicator using float arrays.
public static TechnicalAnalysis.Functions.TrueRangeResult TrueRange(int startIdx, int endIdx, float[] high, float[] low, float[] close);startIdx System.Int32
The starting index for the calculation.
endIdx System.Int32
The ending index for the calculation.
high System.Single[]
An array of high prices.
low System.Single[]
An array of low prices.
close System.Single[]
An array of closing prices.
TrueRangeResult
A TrueRangeResult object containing the calculated values.
This overload accepts float arrays and converts them to double arrays before processing. This may result in a minor performance overhead due to the conversion process.