iADX

Calculates the Average Directional Index (ADX) indicator value for any symbol and timeframe.

Syntax

iADX(
symbol: string,
timeframe: number,
index: number,
adxPeriod: number,
applyToPrice: TPriceType,
bufferIdx: 0 | 1 | 2
): number

Parameters

Parameter
Type
Description

symbol

string

Symbol name

timeframe

number

Timeframe in minutes

index

number

Index of the bar to calculate ADX for

adxPeriod

number

ADX calculation period (typically 14)

applyToPrice

TPriceType

Type of price to use (Open, High, Low, Close, etc.)

bufferIdx

0 | 1 | 2

Buffer index: 0 = ADX, 1 = +DI, 2 = -DI

Return Value

Returns a number representing the requested ADX component value at the specified bar index.

Description

Calculates the Average Directional Index (ADX) indicator.

Example

Last updated