Skip to content

IIndicatorsAccessor.AverageDirectionalMovementIndexRating

method · IIndicatorsAccessor · cAlgo.API.Internals

DesktopCLICloud

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.

Overloads

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.

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

Parameters

Name C# type Python type Description
periods int int The Period of AverageDirectionalMovementIndexRating

Returns AverageDirectionalMovementIndexRating — AverageDirectionalMovementIndexRating

Examples

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);
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.

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

Parameters

Name C# type Python type Description
periods int int The Period of AverageDirectionalMovementIndexRating
maType MovingAverageType MovingAverageType Moving Average Type

Returns AverageDirectionalMovementIndexRating — AverageDirectionalMovementIndexRating

Examples

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