talib.ULTOSC

talib.ULTOSC()函数用于计算Ultimate Oscillator(终极振荡指标)

talib.ULTOSC()函数的返回值为一维数组。 array

talib.ULTOSC(inPriceHLC) talib.ULTOSC(inPriceHLC, optInTimePeriod1) talib.ULTOSC(inPriceHLC, optInTimePeriod1, optInTimePeriod2) talib.ULTOSC(inPriceHLC, optInTimePeriod1, optInTimePeriod2, optInTimePeriod3)

inPriceHLC参数用于指定K线数据。 inPriceHLC true {@struct/Record Record}结构数组 optInTimePeriod1参数用于设置第一个周期,默认值为7。 optInTimePeriod1 false number optInTimePeriod2参数用于设置第二个周期,默认值为14。 optInTimePeriod2 false number optInTimePeriod3参数用于设置第三个周期,默认值为28。 optInTimePeriod3 false number


function main() {
    var records = exchange.GetRecords()
    var ret = talib.ULTOSC(records)
    Log(ret)
}

import talib
def main():
    records = exchange.GetRecords()
    ret = talib.ULTOSC(records.High, records.Low, records.Close)
    Log(ret)

void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.ULTOSC(records);
    Log(ret);
}

ULTOSC()函数在talib库文档中的描述为:ULTOSC(Records[High,Low,Close],First Period = 7,Second Period = 14,Third Period = 28) = Array(outReal)