# Stochastic Oscillator

> The stochastic oscillator shows where the close sits within the recent high low range. Learn %K and %D, overbought and oversold levels, crossovers and divergence.

Source: https://learn.tradelabsai.com/indicators/stochastic-oscillator/  
Track: Indicators · Level: Beginner · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "Stochastic Oscillator", https://learn.tradelabsai.com/indicators/stochastic-oscillator/

The stochastic oscillator is a momentum indicator that compares a market's closing price with its price range over a recent period. It was developed by George Lane in the 1950s. The idea behind it is that in uptrends, prices tend to close near the top of their recent range, and in downtrends, near the bottom. When closes start drifting away from the extremes, momentum may be changing.

## The formula

```
%K = (Close − Lowest low) ÷ (Highest high − Lowest low) × 100
%D = 3 period simple moving average of %K
```

The highest high and lowest low are measured over the lookback period, usually 14. %K is the main line; %D is its smoothed signal line.

**Example: Calculating %K**
Over the last 14 days, the highest high was $60 and the lowest low was $50. Today's close is $58.
%K = (58 − 50) ÷ (60 − 50) × 100 = 80. The close is 80% of the way up the recent range, a strong reading.

## Fast, slow and full stochastics

| Version | How it is built |
|---|---|
| Fast | %K raw, %D = 3 period average of %K |
| Slow | %K smoothed with a 3 period average (the fast %D), and %D = 3 period average of that |
| Full | Custom smoothing for both lines, such as 14, 3, 3 |

The slow stochastic is the most common default because the raw fast version is very jumpy.

## Overbought and oversold

| Reading | Common interpretation |
|---|---|
| Above 80 | Overbought: closing near the top of the range |
| Below 20 | Oversold: closing near the bottom of the range |

As with RSI, overbought is not a sell signal by itself. In strong trends, stochastics can stay above 80 or below 20 for long periods. Overbought and oversold signals work best in ranges.

## Main signals

1. **Crossovers:** %K crossing above %D, especially below 20, is a bullish signal; crossing below %D above 80 is bearish.
2. **Exits from extremes:** stochastic moving back above 20 from below, or back below 80 from above, suggests the extreme move is ending.
3. **Divergence:** price makes a new high while the stochastic makes a lower high (bearish), or price makes a new low while the stochastic makes a higher low (bullish). See [RSI (Relative Strength Index)](https://learn.tradelabsai.com/indicators/rsi/) for more on divergence.

## Trading with the stochastic

### In ranges

Buy near support when the stochastic is below 20 and %K crosses above %D; sell near resistance when above 80 and %K crosses below %D. Stops go beyond the range edges. See [Range Trading](https://learn.tradelabsai.com/strategies/range-trading/).

### In trends

Use the stochastic to time pullback entries in the direction of the trend. In an uptrend, wait for the stochastic to dip into oversold during a pullback and turn up, then buy. Ignore overbought sell signals, since they fight the trend.

**Example: A trend pullback entry**
A stock is in a daily uptrend above its rising 50 day moving average. It pulls back for five days and the slow stochastic falls to 15. On day six, %K crosses above %D and the stock closes higher, holding above a prior breakout level. A trader buys with a stop below the pullback low, using the stochastic only for timing, while the trend decides direction.

## Stochastic vs RSI

| | Stochastic | RSI |
|---|---|---|
| Measures | Close relative to the recent range | Average gains versus losses |
| Sensitivity | More sensitive, more signals | Smoother |
| Typical levels | 80 and 20 | 70 and 30 |

See [RSI (Relative Strength Index)](https://learn.tradelabsai.com/indicators/rsi/) and [Williams %R](https://learn.tradelabsai.com/indicators/williams-r/), which is closely related to the stochastic.

## Common mistakes

- **Selling every overbought reading** in an uptrend.
- **Using the fast stochastic** and reacting to constant noise.
- **Trading crossovers in the middle of the scale,** where they carry little meaning.

## Frequently asked questions

### What does the stochastic oscillator measure?

Where the current close sits within the high to low range of the recent lookback period, as a percentage from 0 to 100.

### What are good stochastic settings?

The slow stochastic with 14, 3, 3 is a common default. Shorter lookbacks give faster, noisier signals.

### Is the stochastic better in ranges or trends?

Its overbought and oversold signals work best in ranges. In trends, it is better used to time pullback entries in the trend's direction.

## Sources

- Wikipedia, [Stochastic oscillator](https://en.wikipedia.org/wiki/Stochastic_oscillator)

## Continue learning

- Next lesson: [CCI (Commodity Channel Index)](https://learn.tradelabsai.com/indicators/cci/)
- Previous lesson: [MACD](https://learn.tradelabsai.com/indicators/macd/)
- Related: [MACD](https://learn.tradelabsai.com/indicators/macd/): MACD tracks the gap between two EMAs to show trend and momentum. Learn the MACD line, signal line and histogram, crossovers, divergence and common pitfalls.
- Related: [RSI (Relative Strength Index)](https://learn.tradelabsai.com/indicators/rsi/): The RSI measures the speed and size of recent price moves on a 0 to 100 scale. Learn the formula, overbought and oversold levels, divergence and how to trade it.
- Related: [Williams %R](https://learn.tradelabsai.com/indicators/williams-r/): Williams %R shows where the close sits within the recent range on a 0 to minus 100 scale. Learn the formula, overbought and oversold levels and trading uses.
- Related: [CCI (Commodity Channel Index)](https://learn.tradelabsai.com/indicators/cci/): The CCI measures how far price is from its average relative to normal deviation. Learn the formula, the plus and minus 100 levels, trend and reversal strategies.
- Related: [Range Trading](https://learn.tradelabsai.com/strategies/range-trading/): Range trading buys near support and sells near resistance while price moves sideways. Learn how to identify ranges, time entries and exit when a range breaks.
- Related: [Mean Reversion](https://learn.tradelabsai.com/strategies/mean-reversion/): Mean reversion trades bet that prices stretched far from their average will come back. Learn the signals, z scores, examples and the risk of fading strong trends.
