MomentumExpert Curated · Playbook

Stoch

Stochastic Oscillator

A bounded 0–100 oscillator that measures where the close sits relative to the high-low range over a chosen lookback — paired with a smoothed signal line for crossover triggers.

Stochastic is a 0–100 momentum oscillator that measures where the close sits within the high-low range over the past N bars. The fast %K line and its smoothed %D signal line cross above 80 for overbought conditions and below 20 for oversold. Default settings: %K=14, %D=3.

Developed by George Lane in the 1950s, the Stochastic Oscillator compares the current close to the trading range of the past N bars (typically 14). The fast %K line ranges 0–100, and a smoothed %D line (default 3-period SMA of %K) acts as a trigger. Readings above 80 are conventionally "overbought," below 20 "oversold."

Stochastic shines in ranging markets where price oscillates between support and resistance — the %K/%D crossovers in oversold/overbought zones produce reliable mean-reversion signals. In strong trends it tends to lock in extremes for long stretches, so use a trend filter alongside it.

Entry ideas

How do I enter trades using Stoch?

03ideas
01Entry idea

Oversold %K/%D cross

A mean-reversion long that fires when momentum confirms a turn from oversold.

02Entry idea

Trend-following pullback

A trend-aligned long that buys momentum resets in confirmed uptrends.

03Entry idea

Bullish stochastic divergence

A reversal-anticipation entry that spots fading downside momentum before price turns.

Exit ideas

When should I exit a Stoch trade?

03ideas
01Exit idea

Overbought %K/%D cross

A symmetrical exit that mirrors the oversold-cross entry.

02Exit idea

Momentum peak exit

An early exit that catches momentum exhaustion before the full %K/%D cross fires.

03Exit idea

Bearish stochastic divergence

A proactive exit triggered when rising price stops producing rising momentum.

Utilities

What else is Stoch good for?

02ideas
01Utility

Trend bias filter

A directional filter that keeps trades aligned with prevailing momentum.

02Utility

%K/%D direction agreement

A confirmation filter that requires both Stochastic lines to point the same way.

How do I read Stoch?

  • Above 80 = overbought. The close is in the upper 20% of the recent range. Mean-reversion risk is elevated, but in trends Stochastic can stay above 80 for many bars without reversing.
  • Below 20 = oversold. The close is in the lower 20% of the recent range. Bounce candidate, with the same trending-market caveat.
  • %K crossing above %D in the oversold zone = textbook long trigger. Crossing below %D in overbought = exit/short trigger.
  • %K and %D direction agreement matters: both rising = strengthening bullish momentum; both falling = weakening. Disagreement = unclear regime.
  • Bullish divergence (price lower low, %K higher low) = waning downside momentum. Same logic in reverse for bearish divergence.
  • Stochastic responds faster than RSI to recent price changes — better for short timeframes, but more prone to false signals in choppy markets.

What are the default Stoch settings?

ParameterDefaultWhen to adjust
%K period14Lane's original setting. Drop to 9 for faster signals on intraday; raise to 21 for less noise on daily charts.
%K smoothing1 (raw) or 3 (slow)Raw %K = 'Fast Stochastic'. Smoothing %K with a 3-bar SMA = 'Slow Stochastic' — less noisy, more popular today.
%D smoothing3%D = 3-bar SMA of %K. The standard Stochastic signal line. Tighter (2) gives earlier signals; wider (5) is smoother.
Overbought threshold80Raise to 90 in strong uptrends to filter trend-continuation false sells.
Oversold threshold20Drop to 10 in strong downtrends.

How do I code Stoch in Pine Script?

//@version=5
indicator("Stochastic Example", overlay=false)

lengthK = input.int(14, title="%K Length",     minval=1)
smoothK = input.int(3,  title="%K Smoothing",  minval=1)
smoothD = input.int(3,  title="%D Smoothing",  minval=1)

k = ta.sma(ta.stoch(close, high, low, lengthK), smoothK)
d = ta.sma(k, smoothD)

plot(k, title="%K", color=color.blue,   linewidth=2)
plot(d, title="%D", color=color.orange, linewidth=2)
hline(80, "Overbought", color=color.red,   linestyle=hline.style_dashed)
hline(20, "Oversold",   color=color.green, linestyle=hline.style_dashed)

Pine's ta.stoch() returns the raw %K only — you smooth it yourself with ta.sma(). Setting smoothK=1 gives you Fast Stochastic; smoothK=3 gives the more common Slow Stochastic. Plotting both %K and %D with horizontal lines at 80/20 makes the standard crossover-in-extreme-zone setup visually obvious.

How is Stoch calculated?

Stochastic compares the current close to the trading range over the lookback period, on a 0–100 scale. A signal line smoothed from %K provides crossover triggers.

  1. 1.Identify the highest high and lowest low over the past 14 bars.
  2. 2.Compute the raw %K = 100 × (close − lowest_low) / (highest_high − lowest_low).
  3. 3.%K = 0 means the close is at the period low; %K = 100 means at the period high; %K = 50 is the midpoint.
  4. 4.Compute the %D signal line as a 3-bar simple moving average of %K.
  5. 5.Crossovers between %K and %D, especially in overbought (above 80) or oversold (below 20) zones, are the standard timing signals.

When does Stoch fail?

Stochastic shines in ranging markets and fails in three regimes.

Strong directional trends produce extended overbought/oversold lockouts — Stochastic can stay above 80 (or below 20) for many bars during a trending move. Selling at 80 in a runaway uptrend is the most common failure.

Choppy, low-momentum sessions produce many false %K/%D crosses inside the 20–80 zone. The crossovers fire constantly without follow-through, and entries get whipsawed.

Very low timeframes (sub-1-minute) generate noisy %K readings dominated by tick-by-tick fluctuations rather than meaningful momentum. Use Slow Stochastic and longer lookback periods on these timeframes.

Pair Stochastic with a trend filter (200 EMA direction, MACD regime, ADX above 20) to gate signals to the prevailing market regime.

What mistakes do traders make with Stoch?

  • Buying every oversold crossover. In strong downtrends, Stochastic prints oversold for dozens of bars while price keeps falling. Always check the trend regime first.
  • Ignoring %K/%D agreement. A %K crossing %D when both are flat means very little; both rising or both falling adds confidence. Direction-of-both filters out roughly half of marginal crosses.
  • Treating divergences as instant entries. Divergences signal momentum exhaustion but do not pinpoint reversal timing. Wait for price confirmation before trading them.
  • Using Fast Stochastic on noisy markets. Raw %K (Fast Stoch) whips around in choppy conditions. Slow Stochastic (3-period smoothing on %K) cuts most of the noise without sacrificing meaningful signals.
  • Not adjusting thresholds for trend regimes. Hardcoding 80/20 gives many false signals in trends. In strong uptrends, raising overbought to 90 (or ignoring overbought signals entirely) is more profitable.

How does Stoch compare to similar tools?

IndicatorWhen to prefer
RSIRSI is smoother and more popular for trend-aligned momentum reads. Stochastic is faster — better for very short timeframes and intraday range trading.
Williams %RWilliams %R is essentially Stochastic flipped (0 to −100 scale, no signal-line smoothing). Same information, different visual convention. Choose by preference.
MACDMACD is unbounded and trend-following oriented. Stochastic is bounded 0–100 and mean-reversion oriented. Use MACD for trend trades, Stochastic for range entries.

Stoch FAQ

What's the difference between Fast and Slow Stochastic?

Fast Stochastic plots the raw %K line and its 3-bar smoothed %D signal. Slow Stochastic adds an extra 3-bar SMA smoothing on %K itself, then applies the 3-bar smoothing for %D — less noisy, fewer false crosses. Most modern charting platforms default to Slow Stochastic. Fast is more responsive but also more whippy.

What's a good Stochastic period for day trading?

The default %K=14, %D=3 works on most timeframes. For very short intraday (1–5 min), some traders prefer 9, 3, 3 for faster response. Going below %K=9 produces too many false signals to be useful. Pair with a higher-timeframe trend filter to gate signals.

Why does Stochastic stay overbought in trends?

Stochastic measures where the close sits within the recent high-low range. In a strong uptrend, the close is consistently near the high — so %K stays near 100 even as price keeps rising. The 80 threshold is a statistical level, not a reversal signal. Use trend filters to mute Stochastic signals during trending moves.

Should I use Stochastic or RSI?

Use Stochastic for short-timeframe range trading and faster signal response. Use RSI for smoother momentum reads, divergence analysis, and trend-aligned entries. Many systems use both: RSI for the trend regime read, Stochastic for the timing trigger within that regime.

Continue exploring

Related indicators in the Playbook

Browse all 8 indicators

About these ideas

Each entry, exit, and utility rule in the Playbook is hand-picked from established trading literature, validated against historical backtests, and reviewed by the PineWiz team. We add new ideas as we encounter them and refresh existing ones when market behavior or default settings shift. Last review: .

Educational content. Not financial advice.