Stochastic Oscillator Explained for Swing Traders
The stochastic oscillator shows where a stock closed within its recent range. Learn the formula, %K and %D, overbought and oversold levels, and how to trade them.
The stochastic oscillator is a momentum indicator that shows where a stock's latest close sits within its high-low range over a set number of periods, scaled from 0 to 100. Readings above 80 are conventionally called overbought and readings below 20 oversold, and swing traders use crossovers of its two lines to time entries and exits, ideally in the direction of the trend.
This guide covers the formula, the %K and %D lines, fast versus slow versions, the standard 14-3-3 settings, three ways to trade it, and its biggest pitfall: staying overbought in a strong trend. It is educational only, not financial advice. Indicators lag and fail, past performance does not guarantee future results, and all numbers are hypothetical.
Key takeaways
- The stochastic oscillator measures the close relative to the recent high-low range, so a reading of 90 means the stock closed near the top of its range, not that it must fall.
- Overbought (above 80) and oversold (below 20) are conditions, not trade signals; in strong trends the indicator can stay at an extreme for weeks.
- The most practical swing use is buying when slow %K crosses above %D from below 20 while the larger trend is up.
- Slow stochastic (14, 3, 3) is the usual choice for daily charts because the fast version is very noisy.
- Divergence between price and the oscillator is a warning, and it needs a price trigger before it becomes a trade.
What is the stochastic oscillator?
It is an indicator developed by George Lane that compares the closing price with the range between the highest high and lowest low of the last N periods. The idea is that in an uptrend, closes tend to be near the top of the range, and in a downtrend, near the bottom. When closes start falling away from the extremes, momentum may be changing.
The oscillator has two lines. %K is the main line, and %D is a moving average of %K that works as a signal line. Both move between 0 and 100.
How is the stochastic calculated?
The raw formula is:
%K = 100 x (Close - Lowest low of N) / (Highest high of N - Lowest low of N)
%D = 3-period simple moving average of %K
Worked calculation (hypothetical)
Over the last 14 days, a stock's highest high is $52.00 and its lowest low is $44.00, a range of $8.00. Today it closes at $50.40.
- %K = 100 x ($50.40 - $44.00) / $8.00 = 100 x 6.40 / 8.00 = 80.
If instead it closed at $45.60, %K = 100 x 1.60 / 8.00 = 20. The indicator is saying only where the close sits in the range. It does not say what will happen next.
What is the difference between fast and slow stochastic?
The slow stochastic smooths the fast one, which makes it less jumpy. The fast stochastic uses the raw %K described above with a 3-period %D. The slow version first smooths raw %K with a 3-period average and uses that as its %K, then takes a 3-period average of it for %D.
| Version | %K | %D | Character |
|---|---|---|---|
| Fast (14, 3) | Raw %K | 3-period average of raw %K | Very sensitive, many false signals |
| Slow (14, 3, 3) | 3-period average of raw %K | 3-period average of slow %K | Smoother, standard for swing trading |
On a daily chart, 14, 3, 3 is the default on most platforms, and it is a reasonable starting point. A shorter lookback such as 5, 3, 3 reacts faster but whips more, while a longer one like 21 smooths further. Pick one and keep it, so you learn how it behaves on the stocks you trade.
What do overbought and oversold mean?
Overbought means the close is near the top of the recent range, and oversold means near the bottom. They describe location, not a forecast. A stock in a strong uptrend can close in the top 20% of its range for many days in a row; selling because the stochastic hit 90 is a classic mistake.
A more useful reading is to wait for the oscillator to leave the extreme. Many traders consider a buy signal when the indicator moves back above 20 after being below it, and consider tightening or exiting when it drops back below 80 after being above it. The cross out of the zone, not the entry into it, is what suggests that the range position has turned.
How do you trade stochastic crossovers?
The core signal is %K crossing %D. A bullish crossover is %K crossing above %D, and a bearish one is %K crossing below %D. Crossovers that occur in the extreme zones carry more weight than ones in the middle, where lines braid constantly.
A practical, trend-aligned swing rule set:
- Trend filter: the price is above a rising 50-day moving average.
- Pullback: the stock has dipped for a few days and slow %K has fallen below 20 (or at least below 30).
- Trigger: slow %K crosses above %D and turns up through 20.
- Entry: buy a few cents above the signal day's high, so you need follow-through.
- Stop: below the pullback low.
- Exit: when %K crosses back below %D from above 80, at a prior resistance, or at a trailing stop.
This pairs well with the 50-day moving average pullback strategy, since the stochastic times the bounce and the average defines the trend.
Worked trade example (hypothetical)
A stock trades in an uptrend above its rising 50-day average. It pulls back from $52.00 to $46.00 over six sessions, and slow %K drops to 14. Two days later slow %K is 24 and has crossed above %D, and the stock closes at $47.20 with a high of $47.40.
- Entry: buy-stop at $47.45.
- Stop: $45.70, just below the pullback low of $45.90. Risk per share: $1.75.
- Target: the prior high of $52.00 gives a reward of $4.55, or about 2.6R. Alternatively exit if %K crosses down from above 80.
- Size: on a $40,000 account risking 1% ($400), $400 / $1.75 is about 228 shares, a position of about $10,800.
If the stock falls through $45.70, you lose about $400 and the setup has failed. A trade like this needs only a reasonable hit rate to be viable with a 2R target, but no individual setup is certain.
How do stochastic divergences work?
Divergence happens when price makes a new extreme but the oscillator does not. In bullish divergence, price makes a lower low while the stochastic makes a higher low, which hints that downside momentum is fading. In bearish divergence, price makes a higher high while the stochastic makes a lower high.
Divergences can appear many times before a reversal, and sometimes a stock simply keeps trending. Use them as a reason to watch, and wait for a price trigger such as a break of a recent high, a bullish candle at support or a break of a trendline. See bullish divergence and bearish divergence for the RSI and MACD versions.
How does the stochastic compare with RSI and Williams %R?
All three are bounded momentum oscillators, but they measure slightly different things.
| Indicator | What it measures | Range |
|---|---|---|
| Stochastic | Close relative to the high-low range | 0 to 100 |
| RSI | Average gains vs. average losses | 0 to 100 |
| Williams %R | Close relative to the high-low range (inverted stochastic) | -100 to 0 |
The Williams %R is essentially the fast stochastic flipped upside down, so the two give the same information. RSI reacts to the size of changes rather than range position. A mean-reversion alternative is the 2-period RSI strategy. Using two indicators that measure similar things adds little; pair an oscillator with trend and volume instead.
What are the limits of the stochastic oscillator?
The stochastic is a lagging, range-bound tool that does badly in strong trends and in news-driven moves. In an uptrend it spends long periods above 80, producing premature sell signals. In a downtrend it sits below 20 and produces premature buy signals. It also gives many whipsaw crossovers in sideways markets with no trend.
For that reason it works best as a timing tool after you have identified the trend and a level, not as a standalone system.
Common mistakes with the stochastic
- Selling every overbought reading. Strong stocks stay overbought.
- Buying every oversold reading. A falling stock can stay oversold.
- Ignoring the trend. Take bullish signals in uptrends and be cautious against the trend.
- Using the fast version on daily charts. It produces too many signals.
- Trading without a stop. The oscillator does not define risk.
- Changing settings after every loss. Optimizing to past data produces fragile results.
The bottom line
The stochastic oscillator tells you where the close sits in its recent range. Use the slow 14-3-3 version, trade crossovers out of oversold zones only in uptrends, treat overbought as a condition and not a sell signal, and always attach a stop and a position size.
StockSetups scans roughly 12,300 US stocks and ETFs after the close for chart patterns confirmed by candlestick signals, and paid plans add indicators such as RSI, MACD, ADX and ATR alongside trade plans with entry, stop and reward:risk. Indicators and patterns fail, so manage risk and do your own research.
For a related momentum gauge, see the RSI indicator.
Frequently asked questions
What does the stochastic oscillator tell you?
It tells you where the latest close sits within the recent high-low range, on a 0 to 100 scale. High readings mean closes near the top of the range and low readings mean closes near the bottom, which gives a view of momentum.
What are the best stochastic settings for swing trading?
The standard 14, 3, 3 slow stochastic on a daily chart is a common default. Shorter settings are more sensitive but noisier, and longer ones are smoother but later.
Is a stochastic reading above 80 a sell signal?
Not by itself. Above 80 means overbought, but strong trends can stay there for weeks. Many traders wait for the lines to cross down from the zone, and they require a price trigger as well.
What is the difference between %K and %D?
%K is the main stochastic line based on the close's position in the range, and %D is a 3-period moving average of %K. Crossovers between the two are the usual trade signals.
Should I use the stochastic alone?
No. It works best as a timing tool combined with a trend filter, a support or resistance level and a stop. Alone, it produces many false signals, especially in strong trends and choppy markets.
Try it free
Produced with AI assistance and published under the StockSetups editorial guidelines.
Get daily signals & real-time alerts.
StockSetups scans ~12,300 US stocks & ETFs after every close and sorts every long setup into four ranked lanes — each with a trade plan — plus an always-on engine firing 35+ real-time intraday alerts. Free for 7 days, no credit card.
Start free — 7-day trial, no card →Free daily signals by email. Top 3 setups per lane after every close. No account needed.
Unsubscribe anytime · Privacy