Minus Directional Indicator (MDI)


Namespace: OpenQuant.API.Indicators
Assembly: OpenQuant.API (in OpenQuant.API.dll)

Syntax

Visual Basic (Declaration)
Public Class MDI
    Inherits Indicator
C#
public class MDI : Indicator
C++
ref class MDI : Indicator
J#
public class MDI extends Indicator
JScript
public class MDI extends Indicator

Remarks

The concept of Directional Movement is based on the assumption that in an upward trend today?s highest price is higher than yesterday?s highest price and in a downward trend today?s lowest price is lower than yesterday?s lowest price. If this is the case, it is a matter of the so-called Outside Days. The difference between today?s high and yesterday?s high divided to True Range corresponds to the Plus Directional Indicator (PDI). The difference between today?s low and yesterday?s low divided to True Range is the Minus Directional Indicator (MDI). These Outside Days consist of a MDI as well as an PDI.

To calculate the Directional Indicators (PDI and MDI), further calculation of the True Range is necessary. The true range is always positive and is defined as the current highest value of the difference among today?s highest price minus today?s lowest price; today?s highest price minus yesterday?s closing price; and today?s lowest price minus yesterday?s closing price.

Note, that there are two styles of indicator MDI. Some trading systems use the formula (which is a little bit distinguished from classical) for calculation of this indicator. Therefore Quant Studio gives an opportunity to use two styles MDI - classical (QuantStudio style) and little bit changed (MetaStock style.)

MDI has QuantStudio style by Default.

Formula for Quant Studio (classical) style:

Inheritance Hierarchy

System.Object
   OpenQuant.API.Indicator
      OpenQuant.API.Indicators.MDI

Thread Safety

Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

See Also