---
type: "Lesson"
title: "Stochastic oscillator"
description: "The stochastic oscillator shows where today's close sits within the high-to-low range of the last n sessions, on a scale of 0 to 100."
tags: ["stochastic","stochastic oscillator","%k","%d","slow stochastic","overbought","oversold","george lane"]
sources: [{"id":"s1","resource":"https://en.wikipedia.org/wiki/Stochastic_oscillator"}]
generated: {"by":"process:eqdoc-okf-export","at":"2026-10-25"}
stale_after: "2027-04-25"
x-eqdoc-id: "ta-stochastic-oscillator"
x-eqdoc-reviewed-at: "2026-10-25"
x-eqdoc-questions: ["What is the stochastic oscillator?","What are %K and %D?","How do I read stochastics?"]
x-eqdoc-licence-note: "Written by eqdoc in its own words; facts checked against the CC BY-SA page listed"
---

The stochastic oscillator shows where today's close sits within the high-to-low range of the last n sessions, on a scale of 0 to 100.

- **Who.** It is credited to George Lane, in the 1950s. The TA-Lib function is `STOCH` (there is also `STOCHF` for the fast version).
- **How it is calculated.** With the common 14-period setting:
  `%K = 100 x (Close - Lowest low of 14) / (Highest high of 14 - Lowest low of 14)`
  `%D = 3-period simple average of %K`
  A %K of 100 means the close is at the top of the 14-session range; 0 means it is at the bottom.
- **Fast and slow.** The "fast" version plots raw %K and its 3-period %D. The more common "slow" version first smooths %K with a 3-period average, then takes another 3-period average of that as %D. Settings are often written as 14, 3, 3.
- **How analysts read it.** Readings above 80 are conventionally labelled overbought: closes have been near the top of the recent range. Below 20 is labelled oversold: closes near the bottom. Analysts also note when %K crosses %D, and divergences where price makes a new high but the oscillator does not.
- **Pitfalls.** In a strong uptrend closes keep landing near the top of the range, so the oscillator can sit above 80 for a long time; the same happens below 20 in a downtrend. It is a fast, jumpy indicator and gives many crossings in choppy markets. The labels describe the past range, not what the price will do next.
- **Difference from RSI.** RSI compares the size of gains with losses; stochastics compares the close with the high-low range. They often agree but can differ.
- **India note.** On a daily chart, 14 periods means 14 NSE or BSE sessions. Use split- and bonus-adjusted highs, lows and closes.
