Skip to content

Stochastic Oscillator

Difficulty beginner

Definition

The Stochastic Oscillator compares a closing price to its price range over a given period. It's based on the observation that in uptrends, prices tend to close near their highs, and in downtrends, near their lows.

Calculation

%K = (Current Close - Lowest Low over n) / (Highest High over n) × 100
%D = SMA(%K, m)  (typically m=3)

Default parameters: n=14, m=3

where: Current Close most recent closing price · Lowest Low over n minimum low across the last n bars · Highest High over n maximum high across the same window · %K raw stochastic value on a 0–100 scale showing where the close sits inside the range · %D m-period SMA of %K, the signal line · n / m lookback and signal-smoothing periods. does: measures the close's position within the recent high-low range — closes near the top push %K toward 100, closes near the bottom toward 0. Range-bound traders take longs on %K crossing above %D while both are below 20, shorts on the reverse above 80, and watch divergence between price and %K to anticipate reversals. In strong trends the oscillator can pin at the extreme — pair with a trend filter so signals are taken only with the dominant bias.

Types

Type %K %D
Fast Raw %K SMA of Fast %K
Slow SMA of Fast %K SMA of Slow %K
Full Custom smoothed %K SMA of Full %K

Slow Stochastic is most commonly used (reduces whipsaws).

Trading Signals

Overbought/Oversold

Above 80 = Overbought
Below 20 = Oversold

Entry Long: %K crosses above 20 (exiting oversold)
Entry Short: %K crosses below 80 (exiting overbought)

Crossover

Bullish: %K crosses above %D (especially in oversold zone) Bearish: %K crosses below %D (especially in overbought zone)

Divergence

Same concept as RSI divergence — price makes new extreme but stochastic doesn't confirm.

Stochastic RSI

StochRSI = (RSI - Min(RSI)) / (Max(RSI) - Min(RSI))

More sensitive than either indicator alone

where: RSI current RSI value · Min(RSI) / Max(RSI) rolling minimum and maximum of RSI over the lookback window · StochRSI normalized in [0, 1], indicating where RSI sits inside its own recent range. does: stacks the stochastic transformation on top of RSI — first RSI compresses price into momentum, then the stochastic step compresses momentum into a fast 0–1 oscillator that frequently touches both extremes. Traders use it like a turbocharged stochastic for short-horizon mean-reversion (buy <0.2, sell >0.8) and read %K/%D crossovers as entry triggers, accepting that the extra sensitivity produces more false signals in strong trends — best paired with a trend filter on a higher timeframe.

Practical Guidelines

  1. Trending Markets — Stochastic stays overbought/oversold in strong trends
  2. Best in Ranges — Most reliable in sideways markets
  3. Combine with Trend — Only take signals in trend direction
  4. %D is Smoother — %D crosses are more reliable than %K crosses
  5. Failure Swings — Similar to RSI, can signal reversals

Next Steps