Momentum
Stochastic Oscillator (%K and %D)
The stochastic oscillator explained: %K and %D, the 20/80 zones, crossovers, how it differs from RSI and stochastic alerts.
4 min readUpdated
The Stochastic Oscillator answers a simple question: where did the price close within its recent range? 100 means at the very top of the range of the last N bars, 0 at the very bottom. Its idea, by George Lane: in uptrends prices close near their highs, in downtrends near their lows, and momentum changes before price does.
What it measures
where and are the highest high and lowest low of the last N bars (the same channel as Donchian), and is the current close. If the range is zero (a flat market) %K is 50.
Unlike RSI, Stochastic uses highs and lows, not only closes, and it has no memory beyond its window: as soon as an old extreme leaves the window, the range changes.
Try it
Notice how %K touches 100 or 0 easily and then snaps back, and how %D trails it.
How Subtrigger computes it
| Output | Stream (ETH on Bybit) | Meaning |
|---|---|---|
k | ind:stoch_14_3_1m@bybit.spot:ETHUSDT:k | %K, the fast line |
d | ind:stoch_14_3_1m@bybit.spot:ETHUSDT:d | %D, the 3-bar average of %K |
Highs and lows come from the bars Subtrigger builds from ticks, the forming bar included. A first value needs 16 bars (14 for the range, plus 2 more for three values of %K). Stocks use 5-minute bars: ind:stoch_14_3_5m@nasdaq.stocks:MSFT:k.
How to read it
| Reading | Meaning |
|---|---|
| %K above 80 | closing near the top of the 14-bar range |
| %K below 20 | closing near the bottom |
| %K crosses above %D below 20 | bullish turn from oversold |
| %K crosses below %D above 80 | bearish turn from overbought |
| %K pinned near 100 for many bars | strong trend: the price keeps making new highs |
Alert ideas
Oversold on a crypto pair:
Alert idea
ETHUSDT Stochastic 14 %K · 1m · Bybit < 20
The fast line crossing above the slow line:
Alert idea
ETHUSDT Stochastic %K · 1m · Bybit > ETHUSDT Stochastic %D · 1m · Bybit
Stochastic vs RSI
| Stochastic | RSI | |
|---|---|---|
| Uses | high, low, close | close |
| Question | where is the close in the range? | how much of the movement was up? |
| Speed | fast, hits extremes often | slower, smoother |
| Memory | only its window | fades exponentially |
| Zones | 20 / 80 | 30 / 70 |
Many traders use both: Stochastic for timing, RSI for the bigger momentum picture.
For pros
- Range sensitivity. A single spike sets the high or low of the window for N bars and compresses %K for all of them. After big wicks, read Stochastic with care.
- Bull/bear setups. Lane's own favourite signal was a divergence between %D and price at extremes, not the plain zone cross.
- Combine with a channel. %K is the position of the close inside the Donchian channel of the same period.
Related
- RSI: the smoother oscillator.
- Donchian Channels: the range Stochastic measures against.
- Bollinger %B: position inside a volatility band instead of a high–low range.
FAQ
What do 14 and 3 mean?
14 is the number of bars of the high–low range, 3 is the number of %K values averaged into %D.
Why is %K exactly 100 sometimes?
The current close is the highest price of the last 14 bars, i.e. at the very top of the range.
Should I alert on %K or %D?
%K for speed, %D for fewer false signals. For "slow stochastic" strategies, use %D.
Keep reading
- MomentumRSIRSI explained for beginners and pros: Wilder's formula, overbought and oversold zones, divergences, regimes and RSI alerts.
- VolatilityDonchianDonchian channels explained: highest high and lowest low, breakouts, turtle trading and Donchian breakout alerts.
- VolatilityBollinger BandsBollinger Bands and %B explained: the bands, squeezes, band walks, mean reversion and Bollinger alerts on crypto and stocks.