Plus Directional Indicator (PDI)
Namespace: OpenQuant.API.Indicators
Assembly: OpenQuant.API (in OpenQuant.API.dll)
Syntax
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 PDI. 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 PDI - classical (QuantStudio style) and little bit changed (MetaStock style.)
PDI has QuantStudio style by Default.
Formula for Quant Studio (classical) style: 