How it is calculated
APO is EMA(fast) minus EMA(slow) of the source. Each EMA is seeded with the plain mean of its own first values, so APO equals the macd line with the same lengths, value for value. TA-Lib APO seeds the fast average later so both start on the same bar; the values agree once that seed has decayed.
Reference: TA-Lib APO with EMA
How to read it
Above zero the fast average is over the slow one and the short term trend points up; below zero it points down. A zero crossing is the crossing of the two averages. In price units, so not comparable between markets; PPO is for that. It lags and whipsaws in a sideways market.
In a strategy
A crossing of two averages as one number: when ctx.ind("apo", fast=12, slow=26) turns from below zero to above, the fast EMA has crossed over the slow one, a common trend entry.
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 |
Sourcesource | Price | "close" | close, open, high, low, hl2, hlc3, ohlc4, hlcc4 |
What it draws
| Line | Drawn as |
|---|---|
| APO | Line |
Guide lines at 0.
Used in
No strategy template reads it yet.