资源加载中... loading...

talib.MAXINDEX

The talib.MAXINDEX() function is used to calculate the index of the highest value in the specified period (maximum index).

The return value of the talib.MAXINDEX() function is: a one-dimensional array. array

talib.MAXINDEX(inReal) talib.MAXINDEX(inReal, optInTimePeriod)

The inReal parameter is used to specify the K-line data. inReal true {@struct/Record Record} structure arrays, numeric arrays The optInTimePeriod parameter is used to set the period, the default value is 30. optInTimePeriod false number

function main() {
    var records = exchange.GetRecords()
    var ret = talib.MAXINDEX(records, 5)
    Log(ret)
}
import talib
def main():
    records = exchange.GetRecords()
    ret = talib.MAXINDEX(records.Close, 5)
    Log(ret)
void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.MAXINDEX(records, 5);
    Log(ret);
}

The MAXINDEX() function is described in the talib library documentation as: MAXINDEX(Records[Close],Time Period = 30) = Array(outInteger)

talib.MAX talib.MIN