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.
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 see | What it suggests |
|---|---|
| Above 80 | The close is near the top of its recent range. Often called overbought. |
| Below 20 | The close is near the bottom of its recent range. Often called oversold. |
| %K crosses above %D | The close is rising within its range faster than its recent average. |
| %K crosses below %D | The 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
- What is RSI? The RSI indicator explainedThe RSI indicator compares recent up moves with down moves on a scale from 0 to 100. Learn how it is calculated, how to read it, and how to test RSI rules.
- MACD indicator explained: how to read itThe MACD indicator is the gap between a fast and a slow moving average. See how it is calculated, how to read the lines and histogram, and how to test it.