Skip to content

Stochastic Oscillator

OVERVIEW

The stochastic oscillator is a bounded momentum indicator (0–100) that measures where the current closing price sits within the recent high-low range. Developed by George Lane in the late 1950s, it reflects the observation that prices close near session highs during uptrends and near session lows during downtrends.

Note

The stochastic oscillator measures the relative position of price within its recent range — not price direction. It is not a trend indicator.

Threshold Condition
Above 80 Overbought
Below 20 Oversold
20–80 Neutral range

FEATURES

Signal Lines

The oscillator plots two lines:

Line Description
%K Fast line — raw position of close within the lookback range
%D Slow line — 3-period simple moving average of %K

Oscillator Variants

Variant Description
Fast Stochastic Raw %K plotted with its 3-period SMA; more reactive, more noise
Slow Stochastic %K pre-smoothed with a 3-period SMA before %D is applied; standard default
Full Stochastic Custom smoothing periods on both lines; exposed by default in Tapeboard

Tip

The Full Stochastic is recommended for most workflows. Adjust smoothing periods in the indicator settings panel to match your timeframe and instrument volatility.

Formula

%K = ((C − L₁₄) / (H₁₄ − L₁₄)) × 100

%D = 3-period SMA of %K
Variable Definition
C Most recent closing price
L₁₄ Lowest low over the lookback period (default: 14)
H₁₄ Highest high over the lookback period (default: 14)

HOW TO USE

Mean-Reversion Entries

  • Long signal — %K crosses above %D while both lines are below 20
  • Short signal — %K crosses below %D while both lines are above 80

Divergence

  • Bearish divergence — price makes a new high while %K prints a lower high; signals momentum exhaustion before a potential top
  • Bullish divergence — price makes a new low while %K prints a higher low; signals potential reversal to the upside

Worked Example — SPY

Assume SPY over the last 14 sessions has a high of $510, a low of $485, and closes at $505.

%K = (($505 − $485) / ($510 − $485)) × 100
%K = ($20 / $25) × 100
%K = 80

A %K reading of 80 places SPY at the upper boundary of its 14-day range. If %D was 75 the prior session and rose to 78, the %K-above-%D crossover in overbought territory is the classic long exit signal.

Note

If SPY then makes a new high at $512 while %K prints only 76, that lower stochastic high against a higher price high is a bearish divergence — one of the most common short-term top signals.

Confirmation and Multi-Timeframe Use

Use Case Approach
Signal filtering Combine with RSI or MACD to reduce false crossovers
Trend bias Use daily stochastic to establish directional lean
Entry timing Use 60-minute stochastic to refine entry within the daily trend
Range-bound markets Most reliable when price oscillates within a defined channel

Lookback Period Sensitivity

Period Effect
Short (e.g., 5) More responsive, higher noise, more false signals
Default (14) Balanced responsiveness and smoothing
Long (e.g., 21) Smoother output, lags reversals

LIMITATIONS

Note

Be aware of the following constraints before incorporating the stochastic oscillator into a live strategy.

Limitation Detail
Trend pinning In strong trends, %K can remain above 80 or below 20 for extended periods; fading these readings causes repeated losses
Whipsaws The fast variant generates frequent crossovers that produce false signals in choppy or low-volatility tape
Overbought ≠ short signal A high reading means the close is near the recent range high — not that price is overvalued in any absolute sense
No price target The indicator signals momentum state only; profit targets must be derived from price-based methods such as support/resistance or ATR multiples

KEYBOARD SHORTCUTS

Action Shortcut
Add Stochastic Oscillator to chart Shift + S
Open indicator settings I
Toggle indicator visibility Alt + H
Cycle between Fast / Slow / Full variants Alt + V
Reset to default parameters Ctrl + R

See also: RSI · MACD · Bollinger Bands · Moving Average · Average True Range