Stochastic oscillator
The stochastic oscillator measures where the latest close sits inside the recent high-low range, scaled 0 to 100 — near 100 the stock is closing at the top of its range, near 0 at the bottom.
George Lane's observation was that closes drift toward the top of the recent range while a move is healthy and stop getting there before the move itself ends. %K expresses it directly: where today's close sits between the highest high and lowest low of the last 14 sessions, as a percentage. This is the slow stochastic — %K is smoothed by 3 bars, and %D is a further 3-bar average of %K, giving a fast line and a slow one to cross it.
The working signal is the cross, gated by the zone. %K crossing above %D while both sit under 20 is the classic oversold turn — the close has begun climbing back through the range after hugging its floor. The mirror above 80 marks short-term exhaustion, and is generally better for timing exits than for initiating shorts, since in strong stocks it precedes a pause more often than a top. Ungated, the same cross fires constantly and means little.
The stochastic's known weakness is the strong trend. A stock making new highs closes near the top of its range by definition, so %K pins above 80 and stays there — every session of a good uptrend looks overbought. Lane's tool describes position in a range, and when there is no range, only a trend, that description stops discriminating. Trend filters exist for exactly this reason.
Against RSI the distinction is what is measured: RSI weighs the size of up-closes against down-closes, the stochastic only asks where the close landed in the range — magnitude versus position. The stochastic is the twitchier of the two, reaching its extremes on moves RSI barely registers, which makes it earlier at turns and wronger between them.
In Sift
Written as stoch().k / .d. A working scan — stocks with a fresh %K/%D bullish cross while the oscillator is still in oversold territory:
where stoch().k crossed above stoch().d within 2 bars and stoch().k < 251
of the 500 most-traded NSE stocks match today, as of 20 Aug 2026
Scans that use it
Prebuilt scans in the library whose query reads this value — each with a hit-rate replay over the last 250 sessions.
Common questions
What is the difference between %K and %D?
%K is the oscillator itself — where the close sits in the 14-bar range, smoothed by 3 sessions in the slow version used here. %D is a further 3-bar average of %K, so it trails it. The fast line crossing the slow one is the event traders act on; the zone it happens in decides whether it means anything.
What is a good stochastic level to buy at?
The convention is a %K/%D bullish cross below 20, reading the stock as turning up from the floor of its range. But in downtrending stocks that cross fails routinely, and in strong uptrends the oscillator rarely visits 20 at all. The zone is a filter, not a signal — and how any threshold has actually resolved is checkable in the replay.
Why does the stochastic stay overbought in an uptrend?
Because it measures position in the range, and a stock making new highs closes near the top of its range by construction. A pinned reading above 80 in a trending stock is a description of strength, not a sell signal — which is the single most common misreading of this indicator.