# Oscillator of Oscillator

A Momentum & Oscillators concept (Oscillator grammar (cross-cutting)) in the LuxAlgo Library, with 1 indicator implementation.

## What is an Oscillator of Oscillator?

An oscillator of oscillator is a second-order indicator: an oscillator transformation applied to another oscillator's output rather than to price. [Stochastic RSI](https://www.luxalgo.com/library/concept/stochastic-rsi/) is the canonical example, a stochastic calculation run on [RSI](https://www.luxalgo.com/library/concept/rsi/) values, but the pattern generalizes: an RSI of on-balance volume, a stochastic of a money-flow oscillator, a derivative of a smoothed RSI. Whatever the pairing, the second layer reads the first layer's shape, so its extremes say the underlying oscillator is stretched relative to its own recent range, not that price itself is.

The best-known member has a clear origin. Tushar Chande and Stanley Kroll introduced Stochastic RSI in their 1994 book The New Technical Trader, explicitly to fix RSI readings that flatten toward mid-range and stop reaching the classic 70/30 extremes. Their remedy, locating RSI inside its own recent high-low range using the [stochastic oscillator](https://www.luxalgo.com/library/concept/stochastic-oscillator/) formula, set the template that later composites follow: keep the first indicator's information, then rescale or differentiate it until its signals become readable again.

Each transformation is chosen for what it fixes: a stochastic layer rescales a sluggish input so 0-100 extremes and crossovers reappear, extra smoothing tames a jumpy one, and differencing (a derivative or [ROC](https://www.luxalgo.com/library/concept/roc/) layer) isolates turning points in the slope. Every added layer also costs something, more lag or more noise plus another parameter set, and it moves the signal one step further from price, which is why second-order signals are usually checked against price structure before acting.

The same pattern hides inside familiar tools. The [MACD](https://www.luxalgo.com/library/concept/macd/) histogram differences the MACD line against its own average, a transformation of an already-derived series, and the [Stochastic Momentum Index](https://www.luxalgo.com/library/concept/stochastic-momentum-index/) applies double smoothing to a stochastic-style core. A sibling pattern is [RSI of other sources](https://www.luxalgo.com/library/concept/rsi-of-other-sources/), which points the RSI formula at volume or breadth data instead of price. What unites them is the reading discipline: the second layer describes the first layer's behavior, so every signal needs anchoring back to the chart.

## How to identify an oscillator of oscillator

On a chart these look like any bounded oscillator; the tell is in the inputs, and construction takes two passes.

1. Compute the first-layer oscillator as usual, for example a 14-period RSI of closing prices.
2. Apply the second transformation to that output series: for a Stochastic RSI, record the highest and lowest RSI values over the last N bars and locate the current RSI inside that range on a 0-100 scale.
3. Smooth the result the way the second oscillator normally is, such as %K and %D averages, since raw second-layer output is usually too jagged to read.
4. To confirm what an unfamiliar plot is, open the indicator's settings: if the source field names another indicator rather than price, it is a second-order oscillator and its extremes describe that indicator, not price.

## How it's calculated

A second-order oscillator that measures the momentum of another oscillator.

```
Spread form: OscOsc_t = Osc_t - MA_p(Osc)
Example base: MACD_t = EMA_12(C) - EMA_26(C)
OsMA_t = MACD_t - EMA_9(MACD)
Re-application form: StochRSI_t = (RSI_t - min_q(RSI)) / (max_q(RSI) - min_q(RSI))

  Osc_t: any base oscillator at bar t (MACD line, RSI, %K, CCI)
  MA_p(Osc): moving average of the base oscillator over p bars (SMA or EMA; p commonly 9)
  OscOsc_t: the oscillator-of-oscillator output
  MACD_t: MACD line
  EMA_n(x): exponential moving average of x over n bars (defaults 12, 26, 9)
  C: close price
  OsMA_t: Moving Average of Oscillator, identical to the MACD histogram
  RSI_t: Relative Strength Index (length commonly 14)
  min_q(x): lowest x over the last q bars
  max_q(x): highest x over the last q bars
  q: stochastic window (commonly 14)
  StochRSI_t: stochastic of RSI, ranging 0 to 1 (often scaled ×100)
  t: bar index
```

Two standard constructions exist: subtracting the oscillator's own signal average (OsMA, the MACD histogram, KaseCD) or feeding one oscillator's output into another oscillator formula (Stochastic RSI).

The spread form crosses zero exactly where the base oscillator crosses its moving average, so its peaks give earlier turn signals than the crossover itself.

Double transformation amplifies noise, so an extra smoothing step, such as a 3-bar SMA on StochRSI, is common.

## How traders use it

- To restore usable extremes: running a stochastic over an oscillator that hovers mid-range brings back 0-100 readings, fixed [overbought/oversold](https://www.luxalgo.com/library/concept/overbought-oversold/) thresholds, and crossover triggers the raw series rarely produces.
- To time slope changes: a derivative or rate-of-change layer on a smoothed oscillator flags when its slope flips, earlier than waiting for a level cross.
- To normalize unbounded series such as volume oscillators or spreads into a bounded scale where alerts and consistent thresholds make sense across instruments.
- As crossover triggers: %K/%D crosses inside the second layer, or a midline cross, give discrete events that are easier to alert on than the shape of the raw oscillator.
- For divergence analysis: [regular divergence](https://www.luxalgo.com/library/concept/regular-bullish-bearish-divergence/) and [hidden divergence](https://www.luxalgo.com/library/concept/hidden-divergence/) are marked between price swings and the second-layer plot, with the caveat that second-order divergences print more often and demand stricter confirmation.

## Oscillator of Oscillator vs first-order momentum tools

- **Stochastic RSI** (https://www.luxalgo.com/library/concept/stochastic-rsi/): Stochastic RSI is the canonical instance of the pattern: the stochastic formula applied to RSI. The general concept covers any such stacking, including derivatives of oscillators and stochastics of money-flow series, each inheriting the same benefit of restored extremes and the same cost of one more step from price.
- **RSI of Other Sources** (https://www.luxalgo.com/library/concept/rsi-of-other-sources/): RSI of other sources changes what the first layer measures, pointing the RSI formula at volume, breadth, or another data series. An oscillator of oscillator changes how a first layer is read, wrapping it in a second transformation. A composite indicator can do both at once.
- **MACD** (https://www.luxalgo.com/library/concept/macd/): MACD is first-order: moving averages of price differenced against each other. Its histogram edges toward second-order territory by differencing the MACD line against its own average, which is why histogram turns lead the signal-line cross the same way second-layer signals lead first-layer ones.

## FAQ

### Why use a Stochastic RSI instead of RSI itself?

When RSI spends long stretches mid-range and rarely tags 70 or 30, a stochastic layer rescales it against its own recent range so extremes and crosses reappear. The cost is noise: Stochastic RSI whipsaws more because it measures RSI's relative position, not price's, so most users add smoothing or confirmation.

### Does an extreme oscillator-of-oscillator reading mean price is overbought?

Not directly. It means the first-layer oscillator is high or low relative to its own recent range. Price can keep grinding in one direction while the second layer cycles from extreme to extreme repeatedly, so bounded second-order readings are treated as timing refinements while price-based evidence carries the directional case.

### Is the MACD histogram an oscillator of an oscillator?

In spirit, yes: it is the MACD line minus a moving average of itself, a transformation applied to an indicator rather than to price. Convention still files it under MACD, but it rewards the same discipline as any second-order tool: its flips describe the MACD line's behavior, one further step removed from price.

### How many layers of indicators is too many?

There is no fixed limit, but each layer adds parameters, adds either lag or noise, and weakens the connection to price. Two layers with a clear purpose, such as a stochastic to restore extremes, is common practice; deeper stacks mostly add degrees of freedom to overfit rather than information.

### What settings does Stochastic RSI typically use?

The widespread default is 14 periods for the RSI, 14 for the stochastic window, then 3-period smoothing for %K and %D. Shortening the stochastic window makes extremes more frequent and less meaningful; lengthening it makes the layer behave more like the raw RSI it wraps.

### Are oscillator-of-oscillator signals more accurate than the originals?

Not inherently. They are more legible: extremes and crosses appear where the raw series produced none, which is a usability gain rather than a predictive one. Whether the extra layer helps depends on the strategy around it, and the claim should be tested on the specific market rather than assumed.

## Implementations in the Library

- Oscillator of Oscillator (LuxAlgo): https://www.luxalgo.com/library/indicator/oscillator-of-oscillator/

## Related concepts

- Regular Bullish/bearish Divergence: https://www.luxalgo.com/library/concept/regular-bullish-bearish-divergence/
- Overbought/oversold: https://www.luxalgo.com/library/concept/overbought-oversold/
- Hidden Divergence: https://www.luxalgo.com/library/concept/hidden-divergence/
- Divergence Variants & Confirmation: https://www.luxalgo.com/library/concept/divergence-variants-and-confirmation/
- Oscillator Swing Failure: https://www.luxalgo.com/library/concept/oscillator-swing-failure/
- Embedded Readings: https://www.luxalgo.com/library/concept/embedded-readings/
- Momentum Expansion vs Contraction: https://www.luxalgo.com/library/concept/momentum-expansion-vs-contraction/
- Centerline Regime: https://www.luxalgo.com/library/concept/centerline-regime/
- Momentum Thrust: https://www.luxalgo.com/library/concept/momentum-thrust/

---

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