# Directional Movement (DM)

#### Description <a href="#description_29" id="description_29"></a>

The Directional Movement indicator is almost identical to the ADX, with the only difference that the +DM and -DM values are also calculated. These values are then later on used for the DMI.

#### Interpretation <a href="#interpretation_14" id="interpretation_14"></a>

The Directional Movement indicator is positive when the difference between the highs is at its largest.

#### Further information <a href="#further-information_13" id="further-information_13"></a>

See: Directional Movement Index ([*DMI*](https://indicators.agenatrader.com/standard-indicators/directional-movement-index-dmi))

#### Usage <a href="#usage_30" id="usage_30"></a>

```csharp
DM(int period)
DM(IDataSeries inSeries, int period)
DM(int period)[int barsAgo]
DM(IDataSeries inSeries, int period)[int barsAgo]
//For the value of +DM
DM(int period).DiPlus[int barsAgo]
DM(IDataSeries inSeries, int period).DiPlus[int barsAgo]
//For the value of -DM
DM(int period).DiMinus[int barsAgo]
DM(IDataSeries inSeries, int period).DiMinus[int barsAgo]
```

#### Return value <a href="#return-value_30" id="return-value_30"></a>

**double**

When using this method with an index (e.g. **DM**(14).DiPlus\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameters <a href="#parameters_27" id="parameters_27"></a>

inSeries Input data series for the indicator

period Number of bars included in the calculations

#### Visualization <a href="#visualization_31" id="visualization_31"></a>

![Directional Movement (DM)](https://agenatrader.github.io/AgenaIndicator-documentation/media/DM.jpg)

#### Example <a href="#example_30" id="example_30"></a>

```csharp
//Output of the DM values
Print("The current +DM value is: " + DM(14).DiPlus[0]);
Print("The current –DM value is: " + DM(14).DiMinus[0]);
```
