Stochastic Oscillator
Where the current close sits relative to the recent high-low range. If we are near the recent high, %K is near 100; near the low, near 0.
Stochastic Oscillator on KO, daily candles. Data via Financial Modeling Prep, cached server-side.
Quick reference
The Stochastic Oscillator is the indicator George Lane built specifically to measure where price closes within its recent range. Lane's premise: in an uptrend, closes cluster near the top of the range. In a downtrend, closes cluster near the bottom. When that pattern breaks, the trend is changing.
That premise is correct, and Stochastic does what it claims to do. The problem is what comes next: traders treat the 80 and 20 levels as automatic sell and buy signals. In ranging markets that works. In trending markets it produces losing trades back-to-back.
What Stochastic actually measures
Stochastic answers one specific question: of the price range over the last N bars (highest high to lowest low), where does the most recent close sit?
If the recent close is at the very top of that range, %K reads 100. If it sits at the very bottom, %K reads 0. If it sits in the middle, %K reads 50. The indicator is bounded between 0 and 100 by construction.
The intuition: when buying pressure dominates, the market closes near its recent highs. %K spends most of its time in the upper half of the range. When selling pressure dominates, closes cluster near recent lows and %K spends most of its time in the lower half.
%D is a 3-period simple moving average of %K, used as the signal line. Crosses of %K and %D form the most-traded stochastic signal.
The "slow stochastic" applies one additional layer of smoothing: the raw %K (sometimes called "fast %K") is smoothed by a 3-period SMA to produce "slow %K," and then %D is computed as another 3-period SMA of that. The slow version is what most platforms display by default.
The formula
Raw %K = ((Close - Lowest Low) / (Highest High - Lowest Low)) × 100
where Lowest Low = lowest low over the last N periods
Highest High = highest high over the last N periods
%D = 3-period SMA of %K
For the slow stochastic, raw %K is first smoothed by a 3-period SMA before computing %D:
Slow %K = 3-period SMA of Raw %K
Slow %D = 3-period SMA of Slow %K
The default settings are N = 14 for %K and 3 for the smoothing.
A worked example
Take a 5-period stochastic for simplicity. Over the last 5 bars, the highest high was 110, the lowest low was 90. The current close is 100 (exactly in the middle of the range).
%K = ((100 - 90) / (110 - 90)) × 100
= (10 / 20) × 100
= 50
If price now rallies and the next close prints at 108 - still inside the 5-bar range (assume the range is unchanged):
%K = ((108 - 90) / (110 - 90)) × 100
= (18 / 20) × 100
= 90
%K jumped from 50 to 90 - now in overbought territory. If the next bar prints a new high above 110, the highest-high updates, the range expands, and %K may pull back even though the close is higher than before. This is why stochastic readings can drop while price rises in strong trends.
If price drops to 95, %K becomes:
%K = ((95 - 90) / (110 - 90)) × 100
= (5 / 20) × 100
= 25
Now in oversold territory. A %K / %D cross above 25 from below would be a textbook "stochastic buy signal" - if (and only if) the broader market is range-bound.
How traders actually use Stochastic
Three setups generate edge. Beyond these, stochastic produces too many false signals to be reliable.
1. Range-bound mean reversion
The classic use case. In a sideways market between defined support and resistance:
- Stochastic reaches above 80 → setup is forming on the high end of the range
- %K crosses below %D (still in overbought territory) → entry trigger short
- Stop above the range high; target the range low
The mirror image applies for longs at oversold. This setup works in clean ranges and fails in trends. Confirm the range is real (the 20-SMA is roughly flat, ADX is below 20) before taking these entries.
2. Divergence
Bullish divergence: price prints a lower low, stochastic prints a higher low. Bearish divergence: price prints a higher high, stochastic prints a lower high. Same logic as RSI divergence.
Stochastic divergence on the daily chart is a high-conviction setup when confirmed by structure (the prior swing high or low breaks). Intraday stochastic divergences are common and resolve in both directions roughly equally.
3. The 50 cross as a trend filter
Stochastic crossing 50 from below indicates closes are now in the upper half of the recent range - the market has shifted from bearish to bullish posture. The 50 cross is a cleaner trend signal than the 80/20 lines for systematic strategies.
For discretionary traders this is less useful than the equivalent RSI 50 cross because stochastic is noisier - the 50 cross flips more frequently than RSI's does.
The trap most retail traders fall into
The default stochastic lesson: "Above 80 = sell, below 20 = buy."
In a trending market this produces the same loss pattern as the RSI 70/30 trap. Stochastic does not just touch 80; in a strong uptrend it stays above 80 for days or weeks. Each cross below 80 (only to recross back above) is interpreted as a sell signal, generating a series of losing short trades into trend strength.
This is why "stochastic gets pinned" is one of the first lessons range-traders learn: in trending markets, the indicator is useless as a counter-trend signal.
The fix is to require regime confirmation:
- Take stochastic overbought / oversold signals ONLY when the market is range-bound (flat 20-SMA, ADX below 20, no clear directional trend)
- In trending markets, ignore stochastic except for divergence and 50-line crosses
- Never act on a single stochastic cross without confluence
The second trap: using the fast stochastic by default. Fast stochastic is too noisy on almost every timeframe; the slow version is what George Lane himself recommended for actual trading and what most platforms default to. Confirm your platform is showing slow stochastic before trading off it.
Stochastic vs other momentum indicators
vs RSI. Both are bounded 0-100 oscillators. RSI measures the ratio of gains to losses; stochastic measures position in the recent high-low range. Stochastic is faster and noisier. RSI handles trending markets slightly better. They produce similar but not identical divergence reads.
vs Williams %R. Williams %R is mathematically equivalent to inverting stochastic and shifting the scale to -100 through 0. Same calculation, different visual presentation. Pick one; using both is redundant.
vs MACD. MACD is unbounded and built from EMA differences. Stochastic is bounded and built from range position. They measure complementary things - many traders use both, with MACD for trend confirmation and stochastic for short-term overbought / oversold reads in the trend's direction.
Common questions
What is the difference between fast and slow stochastic? Fast stochastic uses raw %K directly. Slow stochastic smooths %K with a 3-period SMA first, then computes %D from that smoothed line. Slow is less noisy and is what most traders use; fast generates too many false signals on most timeframes.
Should I change the 14-period default? Usually no. Shorter periods (5, 7) make stochastic faster and noisier; longer (21) smooths but lags. 14 with 3-period smoothing is the standard everyone references.
Why does stochastic stay pinned at extremes? Because in a strong trend, every recent close is near the top (or bottom) of the rolling range. The range itself is moving along with price, so closes near the top of an updrifting range produce high %K readings continuously. Stochastic is functioning correctly - the trader interpreting "pinned at 80 means imminent reversal" is the one misreading it.
Can stochastic work on intraday charts? Yes, but the false-signal rate is high. The 15-minute and 1-hour timeframes are usable. The 1- and 5-minute charts produce too much noise for stochastic to be tradeable on its own.
What about the StochRSI? StochRSI is the stochastic formula applied to RSI values instead of price. The result is even more responsive than either stochastic or RSI individually. It is also noisier and has more false signals. Niche use; not a replacement for the underlying indicators.
Is stochastic better than RSI? Neither is strictly better. Stochastic is faster and noisier, RSI is slower and cleaner. Use the one whose pace matches your decision horizon. Many traders use one; few productively use both simultaneously.
When to use Stochastic and when not to
Use Stochastic when:
- You are trading a clean range and want overbought / oversold timing within it
- You are scanning for divergences on a daily chart
- You need a fast complement to RSI in a specific signal stack
Skip Stochastic when:
- You are in a clear trend - stochastic will pin to extremes and produce false counter-trend signals
- You are scalping on 1- or 5-minute charts where false-signal rate is too high
- You are already using RSI - the additional information is marginal
