How it is calculated
PPO is (EMA(fast) minus EMA(slow)) divided by EMA(slow), times 100, and 0 when the slow average is 0. The signal line is an EMA of PPO over the signal length, the histogram PPO minus signal. Every EMA is seeded with the plain mean of its own first values. TA-Lib PPO seeds the fast average later; the values agree once that seed has decayed. After Appel.
Reference: TA-Lib PPO with EMA (Appel)
How to read it
Above zero the fast average is over the slow one, by that many percent. A crossing of the signal line or a histogram changing sign marks a change of pace; divergences hint at a fading move. Read it like MACD, but in percent: 2 means the same on a stock at 10 as on one at 1000. It lags and crosses often in a sideways market.
In a strategy
A trend entry when the histogram turns positive: ctx.ind("ppo", fast=12, slow=26, signal=9) gives .ppo, .signal and .hist, compared with the previous bar; or a filter that allows longs only while .ppo is above zero.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Fast lengthfast | Whole number | 12 | min 1, max 5000 |
Slow lengthslow | Whole number | 26 | min 1, max 5000 |
Signal lengthsignal | Whole number | 9 | min 1, max 5000 |
Sourcesource | Price | "close" | close, open, high, low, hl2, hlc3, ohlc4, hlcc4 |
What it draws
| Line | Drawn as |
|---|---|
| PPO | Line |
| Signal | Line |
| Histogram | Columns |
Guide lines at 0.
Used in
No strategy template reads it yet.