Price Oscillator
By LuxAlgoApr 13, 2020
The Price Oscillator tracks the gap between a fast and a slow exponential moving average and plots it as a single line swinging around zero, turning the familiar moving average crossover into a momentum reading traders can track bar by bar. A mode input expresses the difference either as a percentage of the slow average — the PPO, and the default — or as an absolute difference in price units, the APO. With the classic 12/26 lengths, every crossing of the zero line lands on the exact bar where the two EMAs cross on the price chart. This is an unembellished implementation of the standard formula.
How to Trade the Price Oscillator?
- Sign: above zero the fast EMA is above the slow EMA and the crossover state favors the upside; below zero is the bearish regime.
- Zero crosses: the bullish or bearish moving average crossover, expressed as an oscillator event; alerts are included for both directions.
- Slope changes: a rising line means the spread is widening; rolling over toward zero warns the move is fading before any cross prints.
- Divergence: a new price extreme on a smaller oscillator swing questions the move's strength.
The zero line is drawn as a dashed reference in the pane.
Price Oscillator Settings
- Fast Length (default 12): the length of the fast EMA. Shortening it makes the oscillator react sooner and whipsaw more often.
- Slow Length (default 26): the length of the slow EMA the fast one is measured against. Lengthening it slows the zero crosses and filters minor swings.
- Source (default close): the price series both EMAs are calculated on.
- Mode (default Percentage): Percentage plots 100 * (fast EMA - slow EMA) / slow EMA; Absolute plots the raw difference in price units.
Frequently Asked Questions
What is the difference between the Price Oscillator and MACD?
In Absolute mode with the 12/26 defaults the line matches the MACD line; MACD adds a signal line and histogram, while this build stays a single line and offers percentage normalization. Reach for it when you want the crossover logic without the extra machinery.
When should I use Percentage mode instead of Absolute?
Percentage keeps readings comparable — a value of 2 means the fast average sits two percent above the slow one at any price level — so it suits screening, comparing symbols, and judging today's value against old history. Absolute suits a single instrument over a stable window, in tradable price units.
What is the main limitation of the Price Oscillator?
It is unbounded, so there are no fixed extreme levels — size up readings against the symbol's own past swings. Built from two lagging averages, its zero crosses also arrive after turns and cluster into whipsaws when price chops around a flat slow EMA.
Free indicator
Get free access to this indicator on the platforms below.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
