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

talib.AVGPRICE

talib.AVGPRICE()函数用于计算Average Price (平均价格)

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

talib.AVGPRICE(inPriceOHLC)

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

function main() {
    var records = exchange.GetRecords()
    var ret = talib.AVGPRICE(records)
    Log(ret)
}
import talib
def main():
    records = exchange.GetRecords()
    ret = talib.AVGPRICE(records.Open, records.High, records.Low, records.Close)
    Log(ret)
void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.AVGPRICE(records);
    Log(ret);
}

AVGPRICE()函数在talib库文档中的描述为:AVGPRICE(Records[Open,High,Low,Close]) = Array(outReal)

talib.WILLR talib.MEDPRICE