Lesson 2 of 8 · 9 min

The stochastic oscillator

How %K and %D are calculated from the recent high-low range, what fast and slow mean, and why the stochastic sits above 80 for most of an uptrend.

By the end you'll be able to

  • Calculate %K from the highest high, lowest low and close of the look-back window
  • Read %K and %D, and the difference between the fast and slow versions
  • Say where the stochastic helps (ranges) and where it misleads (trends)

Free course

Enrol in “Technical Indicators in Depth” to start this lesson

Enrolling is free. Your progress, quiz scores and certificate are kept in your account, on every device.

  • 8 short lessons with quizzes and interactive tools
  • Lesson videos for members
  • A certificate when you finish

RSI and the stochastic both run from 0 to 100 and both draw lines marked “overbought” and “oversold”, so they look like two versions of one tool. They answer different questions.

Where the close sits in the range

1.09671.0816

Illustrative EUR/USD H4 prices: a range, then a trend. The shaded box is the look-back window for the chosen candle.

The stochastic oscillator asks one thing: where did this candle close within the high-low range of the last N candles? The usual N is 14.

%K = (close − lowest low) ÷ (highest high − lowest low) × 100

A reading of 100 means the candle closed at the top of the window. A reading of 0 means it closed at the bottom. 50 is the middle.

%D is the 3-period average of %K, drawn as a second, slower line. A cross of %K above %D is read as momentum turning up.

RSI compares the size of recent up closes with recent down closes. The stochastic ignores the size of each move and only measures position in the range, so it swings to its extremes more often.

Fast and slow

The raw calculation above is the fast stochastic. It is jumpy, because one close can move it 50 points. The slow version averages %K over three candles first (often labelled “slowing” on platforms), then takes %D from that. Slow is smoother and later, the same speed-for-noise trade you saw with moving averages in the previous lesson.

Platforms differ: some open it at 14, 3, 3, MetaTrader at 5, 3, 3. Check what yours uses before comparing readings with anyone else’s.

What it cannot do

The stochastic cannot tell you that a range will hold. In the chart above, once the trend starts, fast %K stays at 77 or higher for more than 20 candles in a row, because closing near the recent high is what an uptrend does. Every “overbought” sell in that stretch would have fought the move.

It also cannot measure how big a move is. A 20-pip range and a 200-pip range both produce readings from 0 to 100.

Where it helps is a market that is already ranging: a cross of %K above %D below 20, at a support level you drew from price, is a reasonable filter for a long. The level does the work; the stochastic adds timing.

Try it

1.09671.0816

The same illustrative prices. Change the period and switch between Fast and Slow.

At period 5 on Fast, count the trips between 80 and 20 in the range half of the chart. Then switch to Slow and raise the period to 14: the line calms down, turns later, and still sits above 80 through the trend.

Quick check

Quick check

  1. Question 1 of 4

    The 14-candle high is 1.0950, the low 1.0890 and the close 1.0905. What is %K?

Go deeper: RSI indicator explained · Bollinger Bands explained

BrokerCut on Telegram

Get the latest forex news and market analysis.

Join the channel