# Oscillator of Oscillator

Runs a stochastic second layer over a selectable first-layer oscillator, RSI, Stochastic %K, CCI, MFI, or Rate of Change, locating it inside its own 14-bar range and smoothing the result into %K (3) and %D (3). Plots the pair with 80/20 extremes, a 50 midline, and a dashboard spelling out the two-pass pipeline. For traders wanting readable extremes from sluggish oscillators.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 7, 2026.
- Access: free.
- Concepts: [Oscillator of Oscillator](https://www.luxalgo.com/library/concept/oscillator-of-oscillator/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=vr6en7minq07ce26m3lz15it
- Page: https://www.luxalgo.com/library/indicator/oscillator-of-oscillator/

**Oscillator of Oscillator** is the general form of the [oscillator of oscillator](https://www.luxalgo.com/library/concept/oscillator-of-oscillator/) construction: a stochastic second layer applied to another oscillator instead of price. The first layer (RSI by default, or Stochastic %K, CCI, MFI, or Rate of Change) is optionally pre-smoothed, located inside its own recent high-low range on a 0–100 scale, then smoothed into %K and its %D signal line. %K colors by its side of the 50 midline, dashed lines mark the 80/20 extremes, and a dashboard spells out the two-pass pipeline and current state.

## How to Trade the Oscillator of Oscillator?

- **%K above 80**: the first-layer oscillator is stretched high within its own recent range. The cross back below the level carries its own alert.
- **%K below 20**: the mirror stretch low; crossing back above is the recovery event.
- **%K/%D crosses**: the crossover trigger, alertable both ways; pane markers are off by default.
- **50 midline**: the bias line: the %K color flip and the midline-cross alerts track it.

Second-layer extremes describe the oscillator, not price: a steady trend can swing the layer between extremes while price barely pauses, so anchor readings back to price structure.

## Oscillator of Oscillator Settings

- **Oscillator** (default RSI): the first-layer base, per its standard definition.
- **Length** (default 14): the first-layer lookback.
- **Source** (default close): feeds the RSI and Rate of Change bases.
- **Pre-Smoothing** (default 1): SMA on the first layer; 1 means none.
- **Stochastic Window** (default 14): the second-layer lookback: shorter makes extremes frequent and cheap, longer behaves like the raw base.
- **%K Smoothing** (default 3) and **%D Smoothing** (default 3): output smoothing and its signal average.
- **Overbought** (default 80) and **Oversold** (default 20): the second-layer extremes.
- **Show Dashboard** (default enabled); **Show %K/%D Cross Markers** (default disabled).

## Frequently Asked Questions

### Is this just Stochastic RSI?

With RSI selected it follows the same two-pass template as [Stochastic RSI](https://www.luxalgo.com/library/indicator/stochastic-rsi/). This build generalizes it: five bases, optional pre-smoothing, an explicit pipeline dashboard.

### Why does it reach extremes so much more often than its base?

By design: the second layer rescales the base inside its own recent range, so mid-scale values print as extremes. It restores readability to sluggish inputs at the cost of extremes that individually mean less.

### Can unbounded oscillators like CCI be used?

Yes. The stochastic layer normalizes whatever it wraps onto the 0–100 scale, precisely its value for unbounded bases like CCI and Rate of Change. The 80/20 levels then apply to any base.

## Related indicators

- [Oscillator Matrix](https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix.md
- [RSI Divergence: Out-of-Sample Optimizer](https://www.luxalgo.com/library/indicator/rsi-divergence-out-of-sample-optimizer/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/rsi-divergence-out-of-sample-optimizer.md
- [HTF Reversal Divergences](https://www.luxalgo.com/library/indicator/htf-reversal-divergences/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/htf-reversal-divergences.md
- [Divergence Variants & Confirmation](https://www.luxalgo.com/library/indicator/divergence-variants-and-confirmation/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/divergence-variants-and-confirmation.md
- [Hidden Divergence](https://www.luxalgo.com/library/indicator/hidden-divergence/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/hidden-divergence.md
- [LuxAlgo - Screener (OSC)](https://www.luxalgo.com/library/indicator/luxalgo-screener-osc/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/luxalgo-screener-osc.md
- [RSI Candlestick Oscillator](https://www.luxalgo.com/library/indicator/rsi-candlestick-oscillator/) (Overbought/oversold): markdown at https://www.luxalgo.com/library/indicator/rsi-candlestick-oscillator.md
- [Adaptive Bounds RSI](https://www.luxalgo.com/library/indicator/adaptive-bounds-rsi/) (Overbought/oversold): markdown at https://www.luxalgo.com/library/indicator/adaptive-bounds-rsi.md

---

Source: https://www.luxalgo.com/library/indicator/oscillator-of-oscillator/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
