The talib.ADXR()
function is used to calculate the Average Directional Movement Index Rating (assessment index).
The return value of the talib.ADXR()
function is a one-dimensional array.
array
talib.ADXR(inPriceHLC) talib.ADXR(inPriceHLC, optInTimePeriod)
The inPriceHLC
parameter is used to specify the K-line data.
inPriceHLC
true
{@struct/Record Record} structure array
The optInTimePeriod
parameter is used to set the period, the default value is 14.
optInTimePeriod
false
number
function main() {
var records = exchange.GetRecords()
var ret = talib.ADXR(records)
Log(ret)
}
import talib
def main():
records = exchange.GetRecords()
ret = talib.ADXR(records.High, records.Low, records.Close)
Log(ret)
void main() {
auto records = exchange.GetRecords();
auto ret = talib.ADXR(records);
Log(ret);
}
The ADXR()
function is described in the talib library documentation as: ADXR(Records[High,Low,Close],Time Period = 14) = Array(outReal)