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

talib.COS

talib.COS()函数用于计算Vector Trigonometric Cos (余弦函数)

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

talib.COS(inReal)

inReal参数用于指定K线数据。 inReal true {@struct/Record Record}结构数组、数值数组

function main() {
    var data = [-3.14, 0, 3.14]
    var ret = talib.COS(data)
    Log(ret)
}
import talib
import numpy as np
def main():
    data = [-3.14, 0, 3.14]
    ret = talib.COS(np.array(data))
    Log(ret)
void main() {
    std::vector<double> data = {-3.14, 0, 3.14};
    auto ret = talib.COS(data);
    Log(ret);
}

COS()函数在talib库文档中的描述为:COS(Records[Close]) = Array(outReal)

talib.CEIL talib.COSH