> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Average Directional Movement Rating (ADXR)

## Description

The ADXR is equal to the current [ADX](/developer/desktop-sdk/references/common/system-indicator-methods/average-directional-index-adx) plus the ADX from n bars ago divided by two.

## Syntax

`ADXR(int interval, int period)`

`ADXR(ISeries\<double\> input, int interval, int period)`

**Returns default value**

`ADXR(int interval, int period)[int barsAgo]`

`ADXR(ISeries\<double\> input, int interval, int period)[int barsAgo]`

## Return Value

**double**; Accessing this method via an index value `[int barsAgo]` returns the indicator value of the referenced bar.

## Parameters

| input    | Indicator source data                                              |
| -------- | ------------------------------------------------------------------ |
| interval | The interval between the first ADX value and the current ADX value |
| period   | Number of bars used in the calculation                             |

## Example

```csharp
// Prints the current value of a 20 period ADXR using default price type
double value = ADXR(10, 20)[0];
Print("The current ADXR value is " + value.ToString());
```

## Source Code

You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.