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

talib.TRIMA

talib.TRIMA()函数用于计算Triangular Moving Average (三指数移动平均)

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

talib.TRIMA(inReal) talib.TRIMA(inReal, optInTimePeriod)

inReal参数用于指定K线数据。 inReal true {@struct/Record Record}结构数组、数值数组 optInTimePeriod参数用于设置周期,默认值为30。 optInTimePeriod false number

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

TRIMA()函数在talib库文档中的描述为:TRIMA(Records[Close],Time Period = 30) = Array(outReal)

talib.TEMA talib.WMA