The resource loading... loading...

talib.AVGPRICE

The talib.AVGPRICE() function is used to calculate Average Price.

The return value of the talib.AVGPRICE() function is a one-dimensional array. array

talib.AVGPRICE(inPriceOHLC)

The inPriceOHLC parameter is used to specify the K-line data. inPriceOHLC true {@struct/Record Record} structure array

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);
}

The AVGPRICE() function is described in the talib library documentation as: AVGPRICE(Records[Open,High,Low,Close]) = Array(outReal)

talib.WILLR talib.MEDPRICE