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

talib.MFI

The talib.MFI() function is used to calculate the Money Flow Index.

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

talib.MFI(inPriceHLCV) talib.MFI(inPriceHLCV, optInTimePeriod)

The inPriceHLCV parameter is used to specify the K-line data. inPriceHLCV true {@struct/Record Record} structure array The optInTimePeriod parameter is used to set the period, the default value is 14. optInTimePeriod false number

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

The MFI() function is described in the talib library documentation as: MFI(Records[High,Low,Close,Volume],Time Period = 14) = Array(outReal)

talib.MACDFIX talib.MINUS_DI