Stochastic oscillator explained: how to read it

By Oalgo · Last reviewed

The Stochastic oscillator shows where the latest close sits within the high-low range of the last 14 candles, on a scale from 0 to 100. A reading near 100 means the close is near the top of that range, and near 0 means it is near the bottom.

Chart: example prices with their high-to-low ranges, and the Stochastic oscillator below them: the %K line, the %D line, and lines at the levels 80 and 20.PriceHigh to low%K%D8020
Example prices, made up for this page. Settings 14 and 3.

How is the Stochastic oscillator calculated?

#
  • Find the highest high and the lowest low of the last 14 candles.
  • %K = 100 × (close − lowest low) ÷ (highest high − lowest low).
  • %D = the 3-period SMA of %K, a smoother second line.

How do you read the Stochastic oscillator?

#
What you seeWhat it suggests
Above 80The close is near the top of its recent range. Often called overbought.
Below 20The close is near the bottom of its recent range. Often called oversold.
%K crosses above %DThe close is rising within its range faster than its recent average.
%K crosses below %DThe close is falling within its range faster than its recent average.

As with RSI, a high reading does not mean price must fall, and a low one does not mean it must rise. In a strong trend the oscillator can stay above 80 or below 20 for a long time.

How do people use the Stochastic oscillator in rules?

#
  • Enter when %K crosses back above 20, and exit when it crosses below 80.
  • Enter when %K crosses above %D while both are below 50.
  • Use it with a trend filter, such as price above a moving average.
  • Change the length: a shorter period moves more, a longer one moves less.

What can the Stochastic oscillator not tell you?

#

The oscillator only compares the close with the recent range. It does not show how big the move is, and a short setting makes %K jump around, so crosses can come often. Test each version on past prices with a backtest, then forward test the one you like.

In Oalgo you can tell Oalgo AI your Stochastic rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.

Read next