What Is the Stochastic Oscillator?
The stochastic oscillator measures where the current close sits inside the highest high and lowest low of the last 14 bars, as a number from 0 to 100. A reading near 100 means price closed near the top of that range and a reading near 0 means it closed near the bottom.
A number between 0 and 100 that answers one narrow question. Knowing exactly which question is the difference between using it and being misled by it.
How it works
Where did the close sit inside the recent range?
%K = 100 × (close − lowest low) / (highest high − lowest low)
Over the last 14 bars by default. Close at the top of that range and you get 100; close at the bottom and you get 0.
That is genuinely all it measures. Not momentum, not strength, not whether something is expensive — a position inside a window.
The two lines
%K is that calculation smoothed by 3 bars. %D is %K smoothed by 3 again. Verified against the arithmetic on this data — %D contains no information %K does not already have.
Which is worth holding on to. A crossover of the two is not two indicators agreeing; it is one series crossing a slower copy of itself, the same point made about derived indicators on the technical analysis page.
Overbought is not a sell signal
This is the one thing worth taking away.
On this chart the oscillator held above 80 for 8 bars while price rose from 100.36 to 101.30 — a new high. Anyone selling the first reading over 80 was short into all of it.
The reason is definitional, not bad luck. A market making higher highs closes near the top of its recent range by construction. So the reading over 80 is not an anomaly signalling exhaustion; it is the arithmetic correctly reporting an uptrend.
Read 80 as “in an uptrend”, not “too high”. The same trap is on the RSI page, and it is the single most expensive misreading of both tools.
Where it does work
The tool is built for a market that keeps returning to the middle. In a trading range, price genuinely does oscillate between an established high and an established low, the range in the denominator is stable, and 20 and 80 land near the edges where being wrong is cheap.
So the honest instruction is a two-step one: decide from market structure whether you are in a range, and only then look at the oscillator. That ordering is doing all the work, and the oscillator is doing the small remaining part.
Used the other way round — oscillator first, structure never — it will hand you a sell signal in every strong uptrend you ever look at.
The settings
Three numbers: the lookback, the %K smoothing, and the %D smoothing. TradingView’s defaults are 14, 3, 3.
The lookback decides how much happens. Measured on this chart: 4 crossings at length 14, and 8 at length 5. Same price, twice the signals.
Neither is right. A shorter length is not more sensitive to the market, it is more sensitive to noise, and choosing it because it produces more trades is choosing the answer first.
A worked example
Establish the condition first. Highs and lows going nowhere, so this is a range.
Mark the range edges from price, not from the oscillator. Those are the actual levels.
Now the reading is useful. Oscillator low, price at the bottom of a real range: two independent reasons pointing the same way.
The invalidation is a close outside the range, which is a price you can name in advance — the oscillator cannot give you one, because it has no price in it.
And if the read was that this is a trend, none of the above applies. Skip the panel entirely.
The original data
Across our study of 24,971 trading videos, 195 cover the stochastic oscillator. The median one gets 11,697 views, 72% never pass 50,000, and the median length is 8.5 minutes.
That is a healthier median than Bollinger Bands at 3,516 or VWAP at 4,017, on roughly half the competition.
The corpus carries description text for 66 of those 195, and across those 66, zero mention invalidation, failure, or what a bad read looks like.
Zero out of sixty-six, on a tool whose single most common use is the one that does not work.
When it fails
In a trend it is wrong for weeks
Covered above and repeated because it is the failure. Eight bars above 80 on this chart while price made a new high, and a real trend runs far longer than eight bars.
In a range it fires constantly
And here is the awkward part: the range is where it is supposed to work. Measured on the sideways stretch above, 8 crossings in 36 bars.
Most were noise. The tool being suited to a condition does not mean every signal it gives in that condition is worth taking — the range edges from price are still what separate the good ones from the rest.
You treated the crossover as confirmation
%D is %K averaged. When they cross, one number has crossed a lagged version of itself, and calling that agreement is counting the same evidence twice.
You found the level after it turned
Every top has a high stochastic reading before it. So does every continuation. With the right-hand side covered, those two are the same picture — which is why the reading alone was never the signal.
Related
RSI is the other 0–100 oscillator, measuring the balance of up moves to down moves rather than position in a range. Comparing the two is the fastest way to see what each actually does.
Trading range is the condition this tool is built for, and how to recognise one from price.
And market structure is the read that has to come first, because it decides whether the panel is worth looking at at all.
The thing that finally made this click for me was realising it does not know what a trend is. It only knows where today closed inside the last fourteen bars, so in a market that is going up every day it reads high every day, and that is correct rather than a warning. I use it in a range and I ignore it in a trend, and if I cannot tell which one I am in then the oscillator is not the tool that will tell me.
— Michael Whitman, from this video
This page is educational, not financial advice. Test every idea on your own charts before risking money.