Stochastic Oscillator
By Chad Smith, Director of Research & Analysis · Updated
On this page
The stochastic oscillator is a momentum indicator that shows where the latest close sits within the high-low range of a recent period. It is credited to George Lane, who popularized it in the 1950s. The idea behind it is simple: in an uptrend, prices tend to close near the top of their range, and in a downtrend, near the bottom. When that habit changes, momentum may be shifting.
What it measures
The stochastic measures the close's position in the recent range on a scale of 0 to 100. A reading of 100 means the close equals the highest high of the period. A reading of 0 means it equals the lowest low. A reading of 50 means it closed exactly halfway.
It has two lines. %K is the main line. %D is a moving average of %K and acts as a signal line. The relationship between them, and their position in the 0 to 100 scale, gives the readings traders use.
Because it uses highs and lows rather than only closes, the stochastic reacts to intrabar range in a way that close-only tools like RSI do not.
The formula
Raw %K = 100 × (Close − Lowest Low(N)) / (Highest High(N) − Lowest Low(N))
Fast stochastic:
Fast %K = Raw %K
Fast %D = SMA(Fast %K, 3)
Slow stochastic (the common default):
Slow %K = SMA(Raw %K, 3)
Slow %D = SMA(Slow %K, 3)
where
N = the lookback period (14 by default)
Lowest Low = the lowest low of the last N bars
Highest High = the highest high of the last N bars
Worked example (illustrative numbers). Over the last 14 bars, the highest high is 120 and the lowest low is 100. Today's close is 115. Raw %K = 100 × (115 − 100) / (120 − 100) = 100 × 15 / 20 = 75. The close is three-quarters of the way up the range. If the previous two raw %K values were 65 and 70, slow %K = (65 + 70 + 75) / 3 = 70. Slow %D would then be the average of the last three slow %K values.
Default settings
| Setting | Conventional value |
|---|---|
| %K period | 14 |
| %K smoothing | 3 |
| %D period | 3 |
| Overbought | 80 |
| Oversold | 20 |
These are written as 14/3/3. Some platforms open the indicator with faster inputs such as 5/3/3, or with no %K smoothing, which gives the fast version, so it is worth checking the inputs before comparing charts. The stochastic is built into MetaTrader, TradingView and other mainstream platforms.
How to read it
Zones. Above 80 is overbought, and below 20 is oversold. These zones say price is closing near the edge of its recent range. They do not say a reversal is due.
%K and %D crosses. When %K crosses above %D, short-term momentum is turning up. When it crosses below, momentum is turning down. Crosses inside the extreme zones are watched most closely.
Exits from the zones. Many traders wait for the lines to leave the zone, for example dropping back below 80, before treating the reading as a signal. This avoids selling into a strong advance that keeps the stochastic pinned near the top.
Divergence. If price makes a lower low but the stochastic makes a higher low, selling momentum is weakening. Lane himself considered divergence one of the more important signals.
Stochastic vs RSI and Williams %R
The stochastic and RSI both run from 0 to 100, but they answer different questions. RSI compares the size of gains with the size of losses. The stochastic compares the close with the range. As a result, the stochastic swings more often between extremes and is usually more useful in ranges, while RSI tends to be steadier and is often preferred for divergence.
Williams %R is mathematically the same as raw fast %K, flipped onto a scale of 0 to −100. It has no smoothing or signal line by default, so it is faster and noisier.
The stochastic RSI applies the stochastic formula to RSI values instead of price, giving a very fast oscillator that reaches extremes frequently.
Common strategies
Range trading
In a sideways market, look for a %K cross below %D above 80 near resistance to sell, and a %K cross above %D below 20 near support to buy. Targets often sit at the opposite side of the range.
Pullbacks in a trend
In an uptrend defined by a moving average, wait for the stochastic to dip into oversold, then buy when it crosses back up. Only take signals in the trend's direction and ignore overbought readings.
Divergence
Watch for divergence between price and the stochastic at swing highs and lows, especially near clear price levels or patterns such as a double bottom.
Lane's setups
Lane also described "bull and bear setups", where the stochastic makes a stronger swing than price, hinting at hidden momentum. These are less common in modern use but follow the same logic of comparing price swings with stochastic swings.
Weaknesses
The stochastic is sensitive. Its readings jump between extremes often, which produces many signals, and in trending markets many of those signals point against the trend.
It can stay pinned. In a strong trend the close keeps landing near the edge of the range, so the stochastic remains overbought or oversold while price continues.
Settings vary across platforms. A 5/3/3 stochastic and a 14/3/3 stochastic can give very different readings on the same chart.
Like other oscillators, it ignores volume and does not identify the trend by itself.
Indicators it pairs with
- A trend filter such as a moving average, ADX or the Ichimoku cloud, to decide which stochastic signals to take.
- RSI, for a smoother second view of momentum.
- Bollinger Bands, where a band touch with a stochastic extreme gives a clearer stretched reading.
- MACD, to confirm that a stochastic turn fits the broader momentum picture.
- Pivot points or other price levels, to give signals a location.
- The Relative Vigor Index, a smoothed oscillator that compares each bar's close with its open.
For more on combining oscillators with trend tools, see the technical analysis course.
Brokers with strong charting to practice on
Put this into practice on a demo account first, with no money at risk.
- Featured broker
Pepperstone4.7 / 5Visit
IC Markets4.9 / 5Visit
GO Markets4.8 / 5Visit
Frequently asked questions
What does the stochastic oscillator measure?
It measures where the latest close sits relative to the highest high and lowest low of a recent period. A reading near the top means price is closing near its recent highs.
What is the difference between fast and slow stochastic?
The fast stochastic uses raw %K and a 3-period average of it as %D. The slow stochastic smooths %K once more, which removes much of the noise and is the version most platforms show.
What are the stochastic overbought and oversold levels?
The standard levels are 80 for overbought and 20 for oversold. Like other oscillators, these describe stretched conditions rather than guaranteed reversals.
Is the stochastic better than RSI?
Neither is better in general. The stochastic is more sensitive and suits range trading, while RSI is smoother and is often preferred for divergence.
Who created the stochastic oscillator?
It is credited to George Lane, who popularized it in the 1950s. He described it as following the speed or momentum of price.