# 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*](/standard-indicators/directional-movement-index-dmi.md))

#### 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]);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indicators.agenatrader.com/standard-indicators/directional-movement-dm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
