Skip to content

Stochastic oscillator: what it is and how to read it

By Bec, futures trader and founder of Wildflower · Updated

The stochastic oscillator shows where the latest close sits inside the recent high to low range, as a number from 0 to 100. Near 100, price closed near the top of the range. Near 0, it closed near the bottom. It has two lines: %K, the reading itself, and %D, an average of %K.

8020Above 80Below 20
A 14-candle stochastic, worked out from the candles: %K solid, %D (a 3-candle average of %K) dashed.
8020Below 20
A 14-candle stochastic, worked out from the candles: %K solid, %D (a 3-candle average of %K) dashed.

What the stochastic measures, and why it’s called that

Take the highest high and the lowest low of the last few . That’s the recent range. The stochastic asks one question: where in that range did the latest candle close?

A close right at the top of the range reads 100. A close at the bottom reads 0. A close halfway reads 50. So it’s always between 0 and 100, like the , and it’s drawn in its own panel under the chart. That makes it an .

“Stochastic” is a maths word for things that involve chance. Don’t let it put you off. The sums behind the indicator are simple, and nothing random goes into them.

How the stochastic is worked out, step by step

High 110Low 100

1. Find the range

Take the highest high and lowest low of the last few candles. Here, 5 candles, to keep it small.

7.5

2. Place the close

The latest close is 107.5. That’s 7.5 above the low.

%K (5)8020

3. Turn it into 0 to 100

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

%K and %D8020

4. Average it for %D

%D is the average of the last 3 %K values.

  • The range: over the last 5 candles, the highest high is 110 and the lowest low is 100. The range is 10.
  • %K: the close is 107.5, which is 7.5 above the low. 7.5 ÷ 10 = 0.75, and × 100 = 75.
  • %D: the last three %K values are 87.5, 90 and 75. (87.5 + 90 + 75) ÷ 3 = 84.17.

Charting tools usually show it with 14 candles for %K and 3 for %D. Those are starting points, not rules. A shorter length makes it swing more, a longer one makes it calmer. The lengths are your choice.

How to read the stochastic: 80, 20 and the two lines

Above 80 for a while8020It can stay high in a climb.
Below 208020Closes near the bottom of the range.
%K crosses %D8020The fast line moves past the slow one.

80 and 20. Most charting tools mark 80 and 20. Above 80 is often called , and below 20 . Those words only mean price has been closing near the top (or bottom) of its range. They don’t mean it has to turn. Some traders use other levels. The levels are your choice.

Two lines. %K reacts first. %D follows a little later, because it’s an average. Many traders watch for %K crossing %D. %K going above %D means the latest closes are higher in the range than the average of the last few.

Staying high. In a strong climb, price keeps closing near the top of its range, so the stochastic can stay above 80 for a long time. The first picture shows it staying there while price kept rising.

What counts as a cross out of an extreme, and what doesn’t

Cross up, both below 20✓8020Crossed inside the extreme. It counts.
Below 20, no cross yet✕8020Low, but %K is still under %D.
Crossed near 60✕8020A cross, but not below 20.

One way traders use it is a cross out of an extreme. For a cross up, %K crosses above %D while both lines are below the lower level. For a cross down, %K crosses below %D while both are above the upper level.

Low isn’t enough. Being below 20 isn’t a cross. Until %K moves past %D, nothing has crossed.

The level matters. A cross near 60 is still a cross, but not a cross out of an extreme. Some rules want both lines past the level, others only %K. Say which one you mean.

Closed candles. The stochastic uses the close, so it moves while a candle is forming. Many traders only count a cross once the candle has closed.

Timeframe changes it. A 5-minute stochastic and a 1-hour one are built from different candles, so they give different readings at the same moment.

Fast, slow and full stochastic

Fast: %K as it is8020Quicker, with more crosses.
Slow: %K smoothed over 38020Smoother, and a little later.

Fast stochastic. %K is used as it is, and %D is a 3-candle average of it. That’s the version worked out above.

Slow stochastic. %K is smoothed first, with a 3-candle average. Then %D is a 3-candle average of that. The lines are calmer and turn a little later.

Full stochastic. You choose all three lengths: the range, the smoothing of %K, and %D. Fast and slow are two settings of it. On TradingView, the built-in Stochastic is the full version, with the smoothing of %K as one of its inputs.

What the stochastic can and can’t tell you

The stochastic describes where recent closes sit in the recent range. It doesn’t tell you what happens next. A reading above 80 can stay above 80, and a cross can be followed by a cross straight back.

It uses the high and low as well as the close, so a long wick can change the range and move the reading. A range with no height at all (every price the same) gives no reading.

Where the stochastic comes from

George Lane, a futures trader and educator in Chicago, made the stochastic oscillator popular in the 1950s. It’s now on almost every charting platform and it’s worked out the same way on futures, stocks, forex and crypto.

Often confused with

RSI. Also runs from 0 to 100, but it compares the size of recent gains with recent losses, using closes only. The stochastic compares the close with the high to low range. Read about the RSI.

Stochastic RSI. The stochastic sum run on RSI values instead of prices. It shows where the RSI sits in its own recent range, so it swings even more.

Williams %R. The same idea turned upside down, on a scale from 0 to −100.

Divergence. When price makes a new high or low and the oscillator doesn’t. Read about divergence.

A stochastic indicator for TradingView

What the Indicator can build

Wildflower’s Indicator marks things on a chart from rules you describe in plain words, with every number typed by you. It builds from moving averages, the RSI, Bollinger Bands, candle patterns, opening ranges and more. The stochastic isn’t one of its building blocks. If you describe a stochastic rule, it tells you plainly. Everything it can build, you can check on a chart for free, then add to TradingView with a step-by-step guide.

The Indicator marking every setup on a practice chart, numbered, with the rule that found each one.

Try it free. You only pay when you add it to TradingView.

Common questions

What does the stochastic oscillator measure?

Where the latest close sits inside the recent high to low range, from 0 (at the low) to 100 (at the high).

What are %K and %D?

%K is the reading itself. %D is an average of the last few %K values, usually 3, so it moves more slowly.

What is a good stochastic setting?

There isn’t one right setting. Charting tools usually show it with 14 and 3, but the lengths are your choice.

What do stochastic 80 and 20 mean?

Above 80, price has been closing near the top of its recent range. Below 20, near the bottom. They describe what happened, not what comes next.

What’s the difference between fast and slow stochastic?

The slow one smooths %K with a 3-candle average first, so both lines are calmer. More above.

How is the stochastic calculated?

%K = 100 × (close − lowest low) ÷ (highest high − lowest low), then %D is an average of %K. See the worked example.

Can the stochastic stay overbought?

Yes. In a strong climb it can stay above 80 for many candles.

What’s the difference between the stochastic and the RSI?

The RSI compares gains with losses. The stochastic shows where the close sits in the high to low range.

Why is my stochastic different from another chart’s?

Check the three lengths, whether %K is smoothed, and the timeframe.

In the help centre