Percentage Price Oscillator
Gerald Appel's MACD is EMA_fast minus EMA_slow - a raw price difference. That is fine for reading one chart, but a MACD reading of 0.0050 means something completely different on a 5-digit forex pair than it does on a 3-digit gold quote, and different again on an index in the thousands. The Percentage Price Oscillator fixes this the obvious way: divide the same difference by the slow EMA and multiply by 100, so the output is always "percent above or below the slow average" regardless of the instrument's price level. PPO = (EMA_fast - EMA_slow) / EMA_slow * 100. A signal line (an EMA of the PPO line itself) and the histogram of PPO minus signal are plotted alongside it, the same three-part layout MACD uses, just on a scale that is meaningfully comparable bar to bar and symbol to symbol. Notes and limitations - Non-repainting: every value depends only on closed bars up to and including its own bar. - Recomputes the full visible history from bar 0 on every call rather than incrementally updating from prev_calculated, because the three chained EMA recursions (fast, slow, signal) all depend on their entire prior history; this is deliberate, matching the other chained-EMA indicators in this catalogue. - Behaves identically to MACD in shape - every crossover and divergence MACD shows, PPO shows too - the only difference is the vertical scale, which is why PPO is useful for cross-symbol comparison and MACD is not. - If the slow EMA is ever exactly zero the PPO value for that bar is defined as 0.0 rather than dividing by zero; this is a defensive fallback, not expected to occur on real price data.
Indicator · MT5 · v1.0 · Free
About Percentage Price Oscillator
Percentage Price Oscillator is an indicator for MetaTrader 5. It has 3 settings, such as Fast period, Slow period and Signal period. MQL source code included.
Files in the download: PercentagePriceOscillator.ex5, PercentagePriceOscillator.mq5, PercentagePriceOscillator.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Fast period | 12 | Fast EMA period |
| Slow period | 26 | Slow EMA period |
| Signal period | 9 | EMA period applied to the PPO line for the signal line |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Gold (XAUUSD) · MACD · Moving Average · Oscillator · MT5 Indicator · MQL5 Source Code