WebCab Technical Analysis Web Services for Delphi v1.1

DirectionalMovementIndicator.DirectionalMotion Method 

Evaluates the Directional Movement Indicator (DMI) which forms the main part of the Directional Movement System developed by Wellas Wilder using only price data.

public double DirectionalMotion(
   double todaysHigh,
   double todaysLow,
   double yesterdaysHigh,
   double yesterdaysLow,
   double yesterdaysClose
);

Parameters

todaysHigh
The highest traded value which the asset under consideration takes during todays market action.
todaysLow
The lowest traded value which the asset under consideration takes during todays market action.
yesterdaysHigh
The highest traded value which the asset under consideration takes during yesterdays market action.
yesterdaysLow
The lowest traded value which the asset under consideration takes during yesterdays market action.
yesterdaysClose
The closing price of the asset the preceding day.

Return Value

The value of the Directional Movement Indicator corresponding to the last two trading periods.

Remarks

When a trend is moving with strength, the directional indicator (ADX) will measure the strength of the trend by measuring the spread between the Plus directional Indicator (PDI) and Minus Directional Indicator (MDI).

Evaluation

The Directional Movement Indicator (DMI) can be summarized by the following formula:

Directional Movement Indicator = 100 * ( (PDM - MDM) / (PDM + MDM) ),

where PDM is the Plus Directional Movement (PDM) indicator over the last two trading periods which can be evaluated using PlusDirectionalMovement and MDM is the Minus Directional Movement (MDM) indicator over the last two trading periods which can be evaluated using MinusDirectionalMovement.

Interpretation

The Directional movement indicator has a range of [0,100], where to higher the value returned the stronger the trend is said to be. If a trend is reliable then the directional lines (PDM and MDM) will diverge and the indicator will increase. If on the other hand a trend starts to fail and price whip-saws (for example with price is within a trading range) the difference between the direction lines will decrease and the overall index will decrease.

Exceptions

Exception TypeCondition
ArgumentExceptionThrown if any of the parameters todaysHigh, todaysLow, yesterdaysHigh, yesterdaysLow or yesterdaysClose is not a positive number.

See Also

DirectionalMovementIndicator Class | Indicators Namespace | PlusDirectionalMovement | MinusDirectionalMovement