Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
Overlap Studies
Momentum Indicators
Volume Indicators
Volatility Indicators
Cycle Indicators
Price Transform
Statistic Functions
Math Transform
Math Operators
Pattern Recognition
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Calculates the Percentage Price Oscillator.

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

Examples

Compute the Percentage Price Oscillator from the latest K-lines.

javascript
function main() { var records = exchange.GetRecords() if (!records) return var ret = talib.PPO(records) Log(ret) }
python
import talib def main(): records = exchange.GetRecords() if not records: return ret = talib.PPO(records.Close) Log(ret)

Returns

TypeDescription

numeric array

Indicator values, the same length as the input; the leading values without enough data are NaN.

Arguments

NameTypeRequiredDescription

inReal

Record array / numeric array

Yes

K-line array (close prices are used) or numeric array; in Python, pass a numeric array such as records.Close.

optInFastPeriod

number

No

Fast period. Default 12.

optInSlowPeriod

number

No

Slow period. Default 26.

optInMAType

number

No

Moving average type; see the MAType table on the Talib page. Default 0 (SMA).

See Also

Remarks

TA-Lib equivalent: PPO(Records[Close],Fast Period = 12,Slow Period = 26,MA Type = 0) = Array(outReal).