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

talib.PPO

The talib.PPO() function is used to calculate the Percentage Price Oscillator.

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

talib.PPO(inReal) talib.PPO(inReal, optInFastPeriod) talib.PPO(inReal, optInFastPeriod, optInSlowPeriod) talib.PPO(inReal, optInFastPeriod, optInSlowPeriod, optInMAType)

The inReal parameter is used to specify the K-line data. inReal true {@struct/Record Record} structure arrays, numeric arrays The optInFastPeriod parameter is used to set the fast period, the default value is 12. optInFastPeriod false number The optInSlowPeriod parameter is used to set the slow period, the default value is 26. optInSlowPeriod false number The optInMAType parameter is used to set the mean type, the default value is 0. optInMAType false number

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

The PPO() function is described in the talib library documentation as: PPO(Records[Close],Fast Period = 12,Slow Period = 26,MA Type = 0) = Array(outReal)

talib.PLUS_DM talib.ROC