BLACK FRIDAY 30% OFF
BLACK FRIDAY SALE 30% OFF MASTERCLASSES USE CODE BLACKFRIDAY SALE STARTS IN 02d 13h 35m 40s
Skip to main content

Stochastic Oscillator Explained: %K, %D, Fast and Slow Settings

The Stochastic Oscillator measures where the latest closing price lies within the highest-high to lowest-low range of a specified number of bars. Its raw %K line ranges from 0 to 100, while %D is a smoothed line used for comparison. A high reading means the close is near the top of its recent range, not that a market is necessarily overvalued or due to fall.

How to calculate %K

For a lookback of N completed bars, including the current bar, calculate %K = 100 × (close − lowest low) ÷ (highest high − lowest low). The denominator is the difference between the highest high and lowest low across the window, not the current candle’s range. If the window has zero range, the formula is undefined; check whether a platform returns a missing value, zero or a carried-forward reading.

Suppose a fictional share has a 14-bar high of £120, low of £100 and latest close of £116. Raw %K equals 100 × 16 ÷ 20 = 80. A close of £104 with unchanged extrema would instead give 20. If the highest high drops out of the rolling window, the value can increase even when the latest close is unchanged.

Close 10420
Close 11050
Close 11680
Raw stochastic readings for a fixed price range of 100 to 120. Scale: 0 to 100. Hypothetical data.

Fast, slow and full stochastic

Fast %K is the raw formula, with fast %D commonly the three-bar simple moving average of raw %K. Slow %K commonly applies a three-bar simple moving average to raw %K, and slow %D applies a further three-bar average. A full stochastic exposes the lookback and smoothing settings separately. Thus the popular 14,3,3 label generally describes a 14-bar lookback, three-bar %K smoothing and three-bar %D smoothing, but users should verify the platform’s parameter order and smoothing method.

Variant%K%D
FastRaw %K3-bar SMA of raw %K
Slow3-bar SMA of raw %K3-bar SMA of slow %K
FullConfigurable smoothing of raw %KConfigurable average of smoothed %K

Worked smoothing example

Five consecutive raw %K values are 20, 35, 50, 65 and 80. Three-period slow %K becomes available on bar three and equals 35, then 50, then 65. On bar five slow %D equals (35 + 50 + 65) ÷ 3 = 50. Fast %K on that bar is 80, while fast %D is 65. The same source prices therefore produce different displayed readings depending on the selected variant.

BarRaw %KSlow %KSlow %D
120Not readyNot ready
235Not readyNot ready
35035Not ready
46550Not ready
5806550

Overbought, oversold and crossovers

Levels of 80 and 20 are commonly used as reference zones. A strong trend can keep the oscillator above 80 or below 20 for extended periods. Crossing below 80 is a different event from %K crossing below %D, and neither event establishes that a reversal is profitable. A completed-bar crossover requires the prior and current relationship to be evaluated consistently: for example, previous %K at or below %D and current %K above %D. Intrabar crossings can disappear before the close.

Stochastic versus RSI

Both have a bounded scale, but RSI uses smoothed gains and losses while stochastic compares the close with a recent range. A stock near its recent high can have a high stochastic reading without an equivalent RSI value. Stochastic RSI is a separate transformation that applies a range-normalisation calculation to RSI values rather than to the original high and low prices. Do not treat these related indicators as independent confirmations without testing.

How to test settings responsibly

A shorter window reacts more rapidly to new highs and lows and may produce more crossings. Additional smoothing can reduce some fluctuations but adds delay. Set the lookback, smoothing and confirmation before viewing subsequent outcomes. Compare against a simple range-position benchmark and report net returns, trade count and drawdown after costs. Include trending and ranging periods, avoid choosing the best historical settings from many trials without a separate validation sample, and execute only after the data needed for the signal is available.

Frequently asked questions

Is 80 a sell signal?

No. It describes the close’s position in the range, and may remain high in an uptrend.

Can %K exceed 100?

Not under the standard formula with consistent OHLC data including the current bar. Out-of-range readings warrant checking the feed or implementation.

Which settings are best?

There is no universally optimal setting. Use the intended timeframe and validate a precisely defined rule independently.

Related guides: RSI, moving average smoothing and backtesting and costs.

Continue your learning with technical analysis foundations and learning pathways and Williams %R.

Further reading

StockCharts ChartSchool: Stochastic Oscillator (Fast, Slow, and Full) documents the conventional formula and variants.

General educational material only, not personalised financial advice. Trading involves risk of loss.


Stay Ahead of the Markets

Get market analysis, financial news and practical trading insights delivered straight to your inbox.