NinjaScript > Language Reference > Indicator Methods >

Average Directional Movement Rating (ADXR)

Print this Topic Previous pageReturn to chapter overviewNext page


The ADXR is equal to the current ADX plus the ADX from n bars ago divided by two.




ADXR(int interval, int period)
ADXR(IDataSeries input, int interval, int period)


Returns default value
ADXR(int interval, int period)[int barsAgo]
ADXR(IDataSeries 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.





Indicator source data (?)


The interval between the first ADX value and the current ADX value


Number of bars used in the calculation




// 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 Tools > Edit NinjaScript > Indicator within the NinjaTrader Control Center window.