Charts See the terminal

Price Oscillator

The gap between a fast and a slow moving average as a percentage of the slow one, so its size can be compared across markets.

Momentum Add to chart

Live Price Oscillator preview · BTC/USDT · Binance

What is Price Oscillator?

The Price Oscillator takes a fast moving average minus a slow one, the same kind of gap as MACD, and divides it by the slow average, so the result is a percentage. A reading of 2 means the fast average is 2 percent above the slow one. The averages are simple by default and exponential with Use exponential MA on. It is drawn as a single line in its own pane.

The percentage makes its size comparable across markets and across time on one market whose price has changed a lot. It has no signal line or histogram, and it does not predict future prices.

How to use Price Oscillator

  • Above or below zero. Above zero, the fast average is above the slow one, read as an uptrend. Below zero, the reverse.
  • Crossing zero. The line crosses zero on the same bar the two averages cross.
  • Size of the reading. The further from zero, the more stretched the fast average is from the slow one, in percent. Comparing those values across markets is what the percentage is for.
  • The slope. A rising line means the gap is widening upwards or narrowing from below.

These are ways to read the line, not entry signals on their own.

Settings

SettingDefaultWhat it changes
Short Length10 Bars in the fast average. Lower reacts sooner and is noisier. Minimum 1.
Long Length21 Bars in the slow average, which is also the denominator. Higher widens the gap and slows the line. Minimum 1.
SourceClose Which price both averages are taken from. Open, high, low and the averaged sources such as hl2 and hlc3 are also available.
Use exponential MAOff When on, both averages are exponential instead of simple, so they lean more on recent bars. Off uses simple averages.

Adjust the two lengths, the price source and the average type in the indicator settings.

Calculation

The gap between the two averages is divided by the slower one:

fast = SMA(price, 10)
slow = SMA(price, 21)
Price Oscillator = 100 * (fast - slow) / slow

With Use exponential MA on, EMA replaces SMA in both averages.

The denominator is the slow average, not the price and not the fast average. With exponential averages, zero crossings happen on exactly the same bars as a MACD with the same two lengths; only the scale differs.

The slow average has its first value on bar 20 counting from 0, which is where the line starts. With Use exponential MA on, each exponential average is started from the simple average of its first values.

Limitations

  • It lags. It is built from two averages of past prices, so zero crossings follow the move.
  • Sideways markets produce repeated crossings. When price ranges, the two averages tangle and the line crosses zero again and again.
  • It has no signal line. Unlike MACD, there is no built-in average of the line to cross, so turns must be judged from the line itself.
  • The live candle moves. The current bar's value changes until that bar closes.
  • It is not a strategy. On its own it carries no risk management, sizing or exit.

Frequently asked questions

The Price Oscillator is the difference between a 10-bar and a 21-bar moving average of price, divided by the 21-bar average and multiplied by 100. The averages are simple by default and exponential with Use exponential MA on. It shows the gap between the two averages as a percentage, in a separate pane.

Both are built on the gap between a fast and a slow average. MACD uses exponential averages, reports the gap in price units and adds a signal line and histogram. The Price Oscillator reports the gap as a percentage of the slow average, with a single line, uses simple averages by default and default lengths of 10 and 21 rather than 12 and 26. With Use exponential MA on and matching lengths, it crosses zero on the same bars as MACD.

Yes. The indicator declares four inputs: Short Length, default 10; Long Length, default 21, each with a minimum of 1; Source, default close; and Use exponential MA, off by default. Open the indicator's settings on the chart to change them.

Values on bars that have already closed are not revised. The current candle's value moves while that candle is live and settles when it closes. With the default simple averages, each value uses a fixed window of past bars, so loading older history does not change it. With Use exponential MA on, the averages need a starting point, so loading older history recalculates them and values near the very start of the loaded range can shift.

Add to chart