# Pretty Good Oscillator

A Momentum & Oscillators concept (Classic single-name oscillators) in the LuxAlgo Library, with 1 indicator implementation.

## What is the Pretty Good Oscillator?

The Pretty Good Oscillator (PGO) measures how far the close sits from its moving average, expressed in units of average true range. The construction is deliberately plain: subtract an N-period simple moving average of the close from the current close, then divide by an N-period exponential average of the true range. The result reads like a volatility-adjusted distance score: a PGO of +3 means price closed roughly three average-true-range units above its own baseline. The indicator is commonly credited to Mark Johnson, who described it as a breakout tool and, in his own self-deprecating phrase, merely a pretty good one.

The design solves a real comparability problem. Raw distance from a moving average is denominated in price, so a 5-point stretch means something entirely different on a quiet instrument than on a wild one. Dividing by a true-range average normalizes the stretch, making thresholds portable across instruments and across volatility regimes on the same instrument.

PGO is unbounded, so it has no fixed [overbought or oversold](https://www.luxalgo.com/library/concept/overbought-oversold/) ceiling; extreme readings mark unusual extension, which breakout traders read as strength and mean-reversion traders read as stretch. That dual reading is the honest core of the tool: the number describes displacement, and the trader supplies the interpretation.

## How it's calculated

PGO is the close's displacement from its simple moving average, scaled by smoothed true range.

```
PGO = (close - SMA(close, n)) / EMA(TR, n)
TR = max(high - low, abs(high - close_prev), abs(low - close_prev))

  n: lookback period (Johnson's long-term version used 89; shorter settings such as 14 or 21 are common)
  SMA: simple moving average
  EMA: exponential moving average
  TR: true range of the bar
  close_prev: the previous bar's close
```

Some implementations use a simple rather than exponential average of true range in the denominator; readings differ modestly.

The output is unbounded and centered on zero, positive when price is above its baseline.

## How traders use it

- As a breakout trigger in the original style: go long when PGO pushes above +3.0, short below -3.0, and exit as it returns through zero, on the logic that a three-unit displacement in true-range terms signals genuine initiative rather than noise.
- As a mean-reversion stretch gauge with the thresholds inverted: some traders fade extreme readings on range-bound instruments, accepting that the same number that marks a breakout on one market marks exhaustion on another.
- As a volatility-normalized filter over other signals, for example only taking [breakout](https://www.luxalgo.com/library/concept/breakout/) entries when PGO confirms the close is meaningfully displaced rather than poking marginally past a level.
- For cross-instrument screening, since the true-range denominator makes a +2.5 reading roughly comparable between a currency pair and an index future in a way raw MA distance never is.
- With its limits in view: PGO knows nothing about structure or volume, whipsaws around its thresholds in transitional regimes, and a zero-line exit gives back a large share of trend profits by construction.

## Pretty Good Oscillator vs adjacent measures

- **Z-score** (https://www.luxalgo.com/library/concept/z-score/): A z-score divides the same displacement by the standard deviation of price. PGO divides by average true range instead, so gaps and intrabar extremes feed the denominator and the reading behaves differently when volatility shows up between closes.
- **Disparity index** (https://www.luxalgo.com/library/concept/disparity-index/): The disparity index expresses distance from the moving average as a percentage of the average. That normalizes for price level but not for volatility; PGO's true-range scaling handles both.
- **Keltner Channels** (https://www.luxalgo.com/library/concept/keltner-channels/): Keltner Channels draw ATR-multiple bands around an average on the price panel; PGO is essentially the same measurement plotted as a single oscillator line, with thresholds standing in for band touches.

## FAQ

### What do the +3 and -3 levels on the Pretty Good Oscillator mean?

They are the breakout thresholds from Johnson's original long-term system: a close roughly three smoothed true-range units away from the moving average. They are conventions, not laws, and shorter-period versions often use tighter levels.

### Is the PGO an overbought/oversold indicator?

Only if you choose to trade it that way. The reading itself just measures displacement; trend traders treat extremes as confirmation while reversion traders treat them as stretch, and the same reading cannot serve both at once on the same market.

### What period should I use for the PGO?

Johnson's published long-term version used 89 bars; many charting platforms default to something shorter such as 14 or 21. Longer settings suit position-style breakout trading, shorter ones make the line fast and noisy.

### How is PGO different from just watching distance to a moving average?

The denominator. Dividing by smoothed [true range](https://www.luxalgo.com/library/concept/atr/) converts a price-denominated distance into volatility units, which is what lets one threshold work across different instruments and regimes.

## Implementations in the Library

- Pretty Good Oscillator (LuxAlgo): https://www.luxalgo.com/library/indicator/pretty-good-oscillator/

## Related concepts

- Balance of Power: https://www.luxalgo.com/library/concept/balance-of-power/
- CCI: https://www.luxalgo.com/library/concept/cci/
- Williams %R: https://www.luxalgo.com/library/concept/williams-percent-r/
- Ultimate Oscillator: https://www.luxalgo.com/library/concept/ultimate-oscillator/
- True Strength Index: https://www.luxalgo.com/library/concept/true-strength-index/
- Relative Vigor Index: https://www.luxalgo.com/library/concept/relative-vigor-index/
- Awesome Oscillator: https://www.luxalgo.com/library/concept/awesome-oscillator/
- Accelerator Oscillator: https://www.luxalgo.com/library/concept/accelerator-oscillator/
- Gator Oscillator: https://www.luxalgo.com/library/concept/gator-oscillator/
- Elder Ray: https://www.luxalgo.com/library/concept/elder-ray/

---

Source: https://www.luxalgo.com/library/concept/pretty-good-oscillator/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/