The resource loading... loading...

talib.MAX

The talib.MAX() function is used to calculate the highest (maximum) value for a specific period.

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

talib.MAX(inReal) talib.MAX(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.MAX(records)
    Log(ret)
}
import talib
def main():
    records = exchange.GetRecords()
    ret = talib.MAX(records.Close)
    Log(ret)
void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.MAX(records);
    Log(ret);
}

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

talib.TANH talib.MAXINDEX