StructureX

Home › Guides › Indicators

Stochastic oscillator explained: where the close sits in the range

The stochastic asks one simple question: did the last candle close near the top or the bottom of its recent range? Once you know that, the 80 and 20 lines make a lot more sense.

Beginner guide · 7-minute read · Updated 2026-10-21

What the stochastic measures

The Stochastic oscillator was made popular by George Lane in the 1950s.

It compares the latest close with the highest high and lowest low of the last 14 candles.

That's all it measures. Where the close sits inside the recent range.

How it's worked out (a simple example)

Look at the last 14 candles.

  1. The highest high is 110.
  2. The lowest low is 100.
  3. The latest close is 108.

Now the math:

So the raw stochastic reads 80. The close sits 80% of the way up the 14-candle range.

%K and %D: the two lines

You'll see two lines, not one.

The common setting is 14, 3, 3:

The raw, unsmoothed version is very jumpy. That's why most charts use the smoothed one.

The 80 and 20 lines

In plain words, above 80 means price has been closing near the top of its recent range. Below 20 means near the bottom.

Look: that doesn't mean price is "too high" or "too low". It means buyers or sellers have been in control lately. See Overbought and oversold.

Why it gets stuck at the top in a trend

Here's the part most guides skip.

In a strong uptrend, almost every candle closes near the top of its recent range. That's what an uptrend is. So the stochastic sits above 80 for a long time.

The same in a downtrend. It can stay below 20 for many candles.

In a trend, a high stochastic isn't a warning. It's a description.

That's why "sell above 80" and "buy below 20" so often fail when price is trending.

The crossover signal

Many traders watch for %K crossing %D.

These crossovers happen a lot. In a range, some line up with the edges. In a trend, many lead nowhere. A crossover is a nudge to look at the chart, not a reason to act.

Stochastic vs RSI

They look alike, and both sit on a 0–100 scale. But they measure different things.

The stochastic tends to be jumpier. It swings from one end to the other more often. For a side-by-side, see RSI vs stochastic.

Where it fits with our method

We read price first. The last places price turned around show the trend.

The stochastic is most useful in one setting: a clear sideways range.

What confirms it? A candle body closing back up from the floor. A wick doesn't count. And if a body closes below the floor, the range is broken. The stochastic reading no longer matters.

In a trend, we mostly ignore the 80/20 lines. The turning points tell us more.

Common mistakes

Try it today on TradingView

About 10 minutes.

  1. Open a daily chart. Add "Stochastic" from Indicators (14, 3, 3 with lines at 80 and 20).
  2. Find a clear uptrend. Count how many candles the %K line spent above 80.
  3. Find a sideways range. Mark the floor and ceiling.
  4. In the range, note each time the stochastic was below 20 at the floor. Did a candle body close back up after it?
  5. Log what you saw in your trading journal. Trend or range, and did the stochastic help?

Write "trend" or "range" at the top of the chart before you look at the stochastic. It changes how you should read it.

Questions

What is the best stochastic setting for beginners?

The common 14, 3, 3 with lines at 80 and 20. It's the default most people use. A faster setting just gives more signals, not better ones.

What does stochastic above 80 mean?

The close has been near the top of the last 14 candles' range. In an uptrend, that's normal and can last a long time. It isn't a sell signal by itself.

What is the difference between %K and %D?

%K is the main line. %D is a 3-candle average of %K, so it moves slower. Crossovers between them are a common, but noisy, signal.

Is stochastic better than RSI?

Neither is better. They measure different things. Stochastic tracks where the close sits in the range. RSI tracks the size of ups versus downs. Both work best as a second opinion.

Does the stochastic work in a trend?

It tends to stay pinned near one end in a trend, which makes the 80/20 lines less useful. It's most helpful in sideways markets.

Want the next step? We'll walk you through it.

Four free lessons by email, one every few days — each with a 10-minute exercise on a real chart.

Send Me the Free Lessons 4 short emails · No spam · Unsubscribe anytime

Or see the whole method, step by step:

See What’s Inside the Course Try everything free first. Decide when you're ready. · Open the free chart tool (works in the TradingView phone app)

One chart idea a day, in plain English. Follow along:

Follow on XFollow on TradingView