---
id: "M:cAlgo.API.Internals.IIndicatorsAccessor.AverageDirectionalMovementIndexRating(System.Int32)"
kind: "method"
type: "T:cAlgo.API.Internals.IIndicatorsAccessor"
url: "https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/AverageDirectionalMovementIndexRating/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# IIndicatorsAccessor.AverageDirectionalMovementIndexRating

Member of [IIndicatorsAccessor](https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/index.md).

## AverageDirectionalMovementIndexRating(int periods)

The Average Directional Movement Index Rating (ADXR) measures the strength of the Average Directional Movement Index (ADX). It's calculated by taking the average of the current ADX and the ADX from one time period before.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
AverageDirectionalMovementIndexRating AverageDirectionalMovementIndexRating(int periods)
```

Python:

```python
api.Indicators.AverageDirectionalMovementIndexRating(periods: int) -> AverageDirectionalMovementIndexRating
```

### Parameters

- `periods` (`int`, Python `int`): The Period of AverageDirectionalMovementIndexRating

### Returns

`AverageDirectionalMovementIndexRating` — AverageDirectionalMovementIndexRating

### Examples

C#:

```csharp
var adxr = Indicators.AverageDirectionalMovementIndexRating(14);
Print("ADX: {0}, ADXR: {1}, DI+: {2}, DI-: {3}", adxr.ADX.LastValue, adxr.ADXR.LastValue, adxr.DIPlus.LastValue, adxr.DIMinus.LastValue);
```

Python:

```python
adxr = api.Indicators.AverageDirectionalMovementIndexRating(14)
api.Print(f"ADX: {adxr.ADX.LastValue}, ADXR: {adxr.ADXR.LastValue}, DI+: {adxr.DIPlus.LastValue}, DI-: {adxr.DIMinus.LastValue}")
```

## AverageDirectionalMovementIndexRating(int periods, MovingAverageType maType)

The Average Directional Movement Index Rating (ADXR) measures the strength of the Average Directional Movement Index (ADX). It's calculated by taking the average of the current ADX and the ADX from one time period before.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
AverageDirectionalMovementIndexRating AverageDirectionalMovementIndexRating(int periods, MovingAverageType maType)
```

Python:

```python
api.Indicators.AverageDirectionalMovementIndexRating(periods: int, maType: MovingAverageType) -> AverageDirectionalMovementIndexRating
```

### Parameters

- `periods` (`int`, Python `int`): The Period of AverageDirectionalMovementIndexRating
- `maType` (`MovingAverageType`, Python `MovingAverageType`): Moving Average Type

### Returns

`AverageDirectionalMovementIndexRating` — AverageDirectionalMovementIndexRating

### Examples

C#:

```csharp
var adxr = Indicators.AverageDirectionalMovementIndexRating(14, MovingAverageType.Exponential);
if (adxr.ADXR.LastValue > 25)
    Print("The market is trending, ADXR: {0}", adxr.ADXR.LastValue);
```

Python:

```python
adxr = api.Indicators.AverageDirectionalMovementIndexRating(14, MovingAverageType.Exponential)
if adxr.ADXR.LastValue > 25:
    api.Print(f"The market is trending, ADXR: {adxr.ADXR.LastValue}")
```

