Stochastic Oscillator (%K and %D)

Stochastic
Indicator

MomentumSeparate panelFree on ChartLabs

The Stochastic shows where the close sits in the high-low range of the last 14 bars, from 0 to 100. It flags price pressing the top or bottom of that range.

Developed by George C. Lane in the late 1950s. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIStochasticchartlabs.co/charts
Atlas reads it

Close is near the bottom of its 14-bar range. Watch for %K to turn up through %D.

%K 1.5 · %D 3.8

Atlas reads it

Close is near the bottom of its 14-bar range. Watch for %K to turn up through %D.

%K 1.5 · %D 3.8

Illustration on simulated data.

Stochastic Oscillator (%K and %D)What is the Stochastic indicator?

The Stochastic draws two lines in their own panel, with dashed levels at 80, 50 and 20 and the band between 20 and 80 shaded light blue. %K is blue and %D, its 3-bar average, is orange.

A %K of 100 means the bar closed at the highest high of the last 14 bars. A %K of 0 means it closed at the lowest low. 50 means it closed right in the middle of that range.

On ChartLabs the default %K smoothing is 1, so %K is the raw value and reacts on every bar. Readings above 80 mean price keeps closing near its recent highs, below 20 near its recent lows. In a strong trend the lines can stay in those zones for a long time.

Fast, slow and full

With %K smoothing at 1 you get the fast Stochastic. Set it to 3 for the classic slow Stochastic. The three inputs together are often called the full Stochastic.

Stochastic or RSI?

RSI compares the size of gains and losses. The Stochastic compares the close with the recent range. The Stochastic usually moves faster and touches its extremes more often.

Stochastic signalsFive patterns to know.

1Bearish lean

Above 80

Closes are near the top of the 14-bar range. Many traders wait for %K to fall back under 80 before reading it as a turn.

2Bullish lean

Under 20

Closes are near the bottom of the range. Many traders wait for %K to climb back above 20.

3Bullish lean

%K crosses above %D under 20

The fast line turns up through its average from the low zone. Momentum is starting to turn up.

4Bearish lean

%K crosses under %D above 80

The fast line turns down through its average from the high zone.

Holds above 80
5Bullish

Pinned above 80

In a strong uptrend %K can stay above 80 for many bars. That is strength, not a top.

Stochastic formulaHow it is calculated.

%K=100×close−LL14HH14−LL14%D=SMA3(%K)
STEP 1

Find the range

Take the highest high (HH) and lowest low (LL) of the last 14 bars.

STEP 2

Place the close

Subtract the low from the close, divide by the range and multiply by 100. With smoothing 1, that is %K.

STEP 3

Average it

%D is the simple average of the last 3 %K values. No value is drawn until each window is full.

Stochastic settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
%K Length141 to 5,000 (typical 5 to 21)How many bars set the high-low range. Shorter is jumpier.
%K Smoothing11 to 5,000An SMA applied to %K. 1 keeps the raw value; 3 gives the slow Stochastic.
%D Smoothing31 to 5,000How many %K values the %D average spans.
Lines%K blue #2962FF, %D orange #FF6D00, 1 pxAny colour and widthColour and width of each line.
Levels80 / 50 / 20, zone 20 to 80AnyMany traders move them to 90 / 10 to cut down signals in trends.
Setting
%K Length
Default
14
Range
1 to 5,000 (typical 5 to 21)
What it changes
How many bars set the high-low range. Shorter is jumpier.
Setting
%K Smoothing
Default
1
Range
1 to 5,000
What it changes
An SMA applied to %K. 1 keeps the raw value; 3 gives the slow Stochastic.
Setting
%D Smoothing
Default
3
Range
1 to 5,000
What it changes
How many %K values the %D average spans.
Setting
Lines
Default
%K blue #2962FF, %D orange #FF6D00, 1 px
Range
Any colour and width
What it changes
Colour and width of each line.
Setting
Levels
Default
80 / 50 / 20, zone 20 to 80
Range
Any
What it changes
Many traders move them to 90 / 10 to cut down signals in trends.
1416 trips into a zone
802070,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

Stochastic strategiesUse it in 3 setups.

Cross up from the low zone

If%Kcrosses above%Dwhile%Kis under 20

Waiting for the cross, rather than acting on the first reading under 20, avoids buying while selling is still speeding up.

Dips inside an uptrend

Whilethe trend is upif%Kdips low and turns up through%D

Traders often use low Stochastic readings to time pullbacks in the direction of the bigger trend, not against it.

Cross down from the high zone

If%Kcrosses under%Dwhile%Kis above 80thentighten the stop

A cross down from above 80 is a reason for caution on a long position, not a short by itself.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

Stochastic mistakesCommon mistakes.

Holds above 80

Selling every reading above 80

In a strong uptrend %K can sit above 80 while price keeps climbing. Wait for it to turn down.

Five crosses in 12 bars

Acting on every raw %K wiggle

With smoothing 1, %K reacts to every bar and crosses %D often. Raise %K smoothing to 3 if the crosses are too frequent.

Buying oversold in a downtrend

In a falling market a cross up under 20 is often only a pause before the next leg down.

Stochastic combinationsPair it with these.

Stochastic FAQQuestions traders ask.

What are the default Stochastic settings?

%K Length 14, %K Smoothing 1 and %D Smoothing 3, the same as TradingView. With smoothing 1, %K is the raw value.

What is the difference between fast and slow Stochastic?

The fast Stochastic uses raw %K. The slow Stochastic smooths %K with a 3-bar average first. On ChartLabs, set %K Smoothing to 3 for the slow version.

What does a Stochastic above 80 mean?

The close is in the top fifth of the last 14 bars' range. It is a reading, not a sell signal. Strong trends keep it there.

What is a Stochastic crossover?

%K crossing its average %D. A cross up from under 20 or down from above 80 is the classic way to read it.

Stochastic or RSI: which is better?

They measure different things. RSI compares gains with losses. The Stochastic places the close in the recent range. Many traders use one, not both, to avoid doubling the same signal.

What is the best Stochastic setting for day trading?

14, 1, 3 is the standard. Some day traders use 5, 3, 3 for faster signals, accepting more false ones.

Does the Stochastic work on crypto?

Yes. Crypto trends can keep it pinned near 80 or 20, so many traders focus on crosses in the direction of the trend.

Is the Stochastic leading or lagging?

It is built from past bars, so it lags. It turns sooner than many oscillators because it reacts to where the close sits in the range.

Does the Stochastic repaint?

No. Values on closed bars never change. The live bar moves until it closes.

Who created the Stochastic?

George C. Lane developed and popularised it from the late 1950s onward.

Related indicatorsMore momentum tools.

All momentum indicators

Try Stochastic on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
Stoch (14, 1, 3)