No ads. No sponsors. Self-funded. Built for you, not advertisers.
Ghost Man Encyclopedia · Momentum indicators

How is the stochastic oscillator calculated (%K, %D, fast vs slow)?

By Ghost Man Trades · Last reviewed · Education only, not advice

Short answer. The stochastic oscillator, developed by George Lane in the late 1950s, shows where the latest close sits within the high-low range of the last 14 periods, from 0 (at the low) to 100 (at the high). %K is that reading; %D is a 3-period average of it. The slow version smooths %K once more, so it is less jumpy.

New to the stochastic? Start with the short Swing School lesson and the overview of overbought vs oversold. This page goes further: the exact formulas, the three versions and a full worked example.

The stochastic in plain English

George Lane's idea was simple: in an uptrend, closes tend to land near the top of the recent range; in a downtrend, near the bottom. So instead of asking how much price moved, the stochastic asks where today's close sits between the recent high and low. A reading of 90 means the close is 90% of the way from the 14-period low to the 14-period high. Lane described it as following the speed, or momentum, of price.

The formulas

  • %K = (close − lowest low) ÷ (highest high − lowest low) × 100, using the last 14 periods.
  • Fast stochastic: fast %K is the raw %K above; fast %D is a 3-period simple average of fast %K.
  • Slow stochastic: slow %K is a 3-period average of fast %K (so it equals fast %D); slow %D is a 3-period average of slow %K.
  • Full stochastic: the slow version with all three numbers adjustable. Default 14, 3, 3.
  • Traditional levels: above 80 overbought, below 20 oversold.

Example (hypothetical numbers).

  • Over the last 14 days, Example Co.'s highest high is $60 and lowest low is $40, a $20 range.
  • It closes at $55: %K = ($55 − $40) ÷ $20 × 100 = 75.
  • A week later it closes at $42 with the same range: %K = ($42 − $40) ÷ $20 × 100 = 10, oversold.
  • The next three fast %K readings are 10, 15 and 35. Fast %D = (10 + 15 + 35) ÷ 3 = 20.
  • %K at 35 has crossed above %D at 20 after both were near the bottom: the classic "turning up from oversold" picture. On a slow stochastic, that same move would show up a little later and more smoothly.

Common mistakes

  • Using the fast version on noisy charts. Fast %K can jump from 10 to 70 in two days. Most charting platforms default to the slow or full version for that reason.
  • Selling every reading above 80. Strong trends keep the close near the top of the range. See overbought vs oversold.
  • Counting it as extra proof next to RSI. Both come from the same prices. Agreement between them is one piece of evidence, not two.
  • Ignoring the range. If the 14-period high and low are only a few cents apart, tiny moves swing the reading from 0 to 100.
  • Skipping divergence. Lane put the most weight on divergence between %D and price, not on simple 80/20 crossings.

How Ghost Man uses this

Ghost Man doesn't plot the stochastic. Our oscillator is the Ghost Wave, our own 0 to 100 score, and its formula is our own. What it shares with the stochastic is the scale and the logic of waiting for a turn: a Ghost Man buy needs the Ghost Wave to turn up from 20 or lower, not just touch the bottom, and a take-profit needs it to turn down from 80 or higher while price is in the red zone at the top of its 1-year range.

The bigger difference is what sits underneath. A stochastic turning up says nothing about value, so we also require the weekly close to be no more than 10% above the 4-year average. Even then signals can fail, and our rules have no stop loss.

Related terms

Learn it step by step in Swing School

Frequently asked questions

What do the numbers 14, 3, 3 mean on a stochastic?

On the full stochastic: a 14-period look-back for the high-low range, 3 periods of smoothing to make slow %K, and a 3-period average of that to make %D. The fast and slow versions default to 14 and 3.

Is the stochastic better than RSI?

Neither is better in general. The stochastic compares the close with the recent range, while RSI compares average gains with average losses. The fast stochastic moves more quickly, so it gives earlier but noisier readings.

What is a stochastic crossover?

%K crossing above %D, or below it. A cross above %D while both are under 20 is a popular sign that momentum is turning up from oversold.

Why can the stochastic stay above 80 for weeks?

Because in a strong uptrend the close keeps landing near the top of the recent range. That is a sign of strength, not automatically a reason to sell.

Sources

We check every definition and formula against these sources. Our own rules come from the Ghost Man scan code that runs this site.

Education only. Education only, not financial advice. Ghost Man Trades is not a registered investment adviser or broker-dealer. Past results, including historical signal records, do not guarantee future results. Trading involves risk of loss. All examples on this page are hypothetical and use made-up numbers to show the math.

All encyclopedia entries · Glossary · Swing School

See it on a live chart

The Ghost Report shows which quality stocks sit near or below their 4-year average right now. Members also get the Ghost Man indicator on their own TradingView charts.

60 days free, no card needed. Then $49/month for founding members, locked in for life. $99/month regular price later.

Start the free 60-day beta