Skip to content

Latest commit

 

History

History
217 lines (126 loc) · 10.9 KB

TAMath.MinusDI.md

File metadata and controls

217 lines (126 loc) · 10.9 KB

TAMath.MinusDI Method

Overloads
MinusDI(int, int, double[], double[], double[]) Calculates the Minus Directional Indicator (-DI) using a default time period of 14.
MinusDI(int, int, double[], double[], double[], int) Calculates the Minus Directional Indicator (-DI) which measures the strength of negative price movement.
MinusDI(int, int, float[], float[], float[]) Calculates the Minus Directional Indicator (-DI) for float arrays using a default time period of 14.
MinusDI(int, int, float[], float[], float[], int) Calculates the Minus Directional Indicator (-DI) for float arrays.

TAMath.MinusDI(int, int, double[], double[], double[]) Method

Calculates the Minus Directional Indicator (-DI) using a default time period of 14.

public static TechnicalAnalysis.Functions.MinusDIResult MinusDI(int startIdx, int endIdx, double[] high, double[] low, double[] close);

Parameters

startIdx System.Int32

The starting index for the calculation.

endIdx System.Int32

The ending index for the calculation.

high System.Double[]

Array of high prices.

low System.Double[]

Array of low prices.

close System.Double[]

Array of closing prices.

Returns

MinusDIResult
A MinusDIResult object containing the calculated values and metadata.

TAMath.MinusDI(int, int, double[], double[], double[], int) Method

Calculates the Minus Directional Indicator (-DI) which measures the strength of negative price movement.

public static TechnicalAnalysis.Functions.MinusDIResult MinusDI(int startIdx, int endIdx, double[] high, double[] low, double[] close, int timePeriod);

Parameters

startIdx System.Int32

The starting index for the calculation.

endIdx System.Int32

The ending index for the calculation.

high System.Double[]

Array of high prices.

low System.Double[]

Array of low prices.

close System.Double[]

Array of closing prices.

timePeriod System.Int32

The number of periods to use in the calculation (default: 14).

Returns

MinusDIResult
A MinusDIResult object containing the calculated values and metadata.

Remarks

The Minus Directional Indicator is part of the Directional Movement System developed by Welles Wilder. It measures the strength of negative price movement and is typically used in conjunction with the Plus Directional Indicator (+DI) to identify trend direction and strength. When -DI is above +DI, it suggests a downward trend.

TAMath.MinusDI(int, int, float[], float[], float[]) Method

Calculates the Minus Directional Indicator (-DI) for float arrays using a default time period of 14.

public static TechnicalAnalysis.Functions.MinusDIResult MinusDI(int startIdx, int endIdx, float[] high, float[] low, float[] close);

Parameters

startIdx System.Int32

The starting index for the calculation.

endIdx System.Int32

The ending index for the calculation.

high System.Single[]

Array of high prices.

low System.Single[]

Array of low prices.

close System.Single[]

Array of closing prices.

Returns

MinusDIResult
A MinusDIResult object containing the calculated values and metadata.

Remarks

This overload accepts float arrays and converts them to double arrays before performing the calculation.

TAMath.MinusDI(int, int, float[], float[], float[], int) Method

Calculates the Minus Directional Indicator (-DI) for float arrays.

public static TechnicalAnalysis.Functions.MinusDIResult MinusDI(int startIdx, int endIdx, float[] high, float[] low, float[] close, int timePeriod);

Parameters

startIdx System.Int32

The starting index for the calculation.

endIdx System.Int32

The ending index for the calculation.

high System.Single[]

Array of high prices.

low System.Single[]

Array of low prices.

close System.Single[]

Array of closing prices.

timePeriod System.Int32

The number of periods to use in the calculation (default: 14).

Returns

MinusDIResult
A MinusDIResult object containing the calculated values and metadata.

Remarks

This overload accepts float arrays and converts them to double arrays before performing the calculation. This ensures compatibility with data sources that provide float precision while maintaining accuracy in the calculations.