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

talib.DEMA

talib.DEMA()函数用于计算Double Exponential Moving Average (双指数移动平均线)

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

talib.DEMA(inReal) talib.DEMA(inReal, optInTimePeriod)

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

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

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

talib.BBANDS talib.EMA