Stochastic Oscillator indicator: settings and signals
The Stochastic shows in which part of its recent range price has closed: near the high, near the low, or in the middle.
What the indicator looks like on a real chart
Data: EUR/USD, daily bars, 2025-06-16 — 2026-07-20. The indicator is computed over 400 bars; the chart shows the last 180. Quote source: Binance Spot REST API (api.binance.com/api/v3/klines).
| Regime | Score |
|---|---|
| Trending market | 37 |
| Range | 64 |
| High volatility | 35 |
| Low volatility | 55 |
What the indicator actually measures
George Lane built the indicator around an observation about how price behaves within a range: as price rises, closes tend toward the upper edge of the recent range; as it falls, toward the lower edge. The formula literally measures this position and converts it into percent.
Unlike RSI, which smooths price changes, the Stochastic operates on the period extremes. Because of this it is far sharper: it is enough for one new high to enter the calculation window and the formula denominator changes in a jump. The indicator regularly pins to 0 and 100 where RSI stays in the middle of the scale.
Practical work is done with two lines: the fast %K and its smoothed version %D. The signal is considered to be their crossover rather than simply entering a zone — this partly compensates for the excessive jumpiness of the base calculation.
Formula
The numerator is the distance from the period low to the closing price, the denominator is the entire range of the period. If the close coincided with the window high the value is 100; if with the low, zero. There is no smoothing in the original formula; it is added separately.
Standard settings
| Parameter | Value |
|---|---|
| %K period, slowing, %D | 14, 3, 3 |
| Overbought / oversold | 80 / 20 |
| Scalping setting | 5, 3, 3 |
The 14/3/3 set is the standard, where 14 defines the range window and the threes handle the smoothing of %K and %D. The 5/3/3 variant gives a "fast" Stochastic suitable for scalping and almost unusable on calm instruments because of noise. The 80/20 levels are wider than RSI's 70/30 precisely because the Stochastic by its nature reaches extreme values more often.
Implementation code (Python)
def stochastic(high, low, close, k_period=14, d_period=3):lowest = low.rolling(k_period).min()highest = high.rolling(k_period).max()k = 100 * (close - lowest) / (highest - lowest)return k, k.rolling(d_period).mean()
When the indicator stops working
- In a strong trend the indicator sticks in an extreme zone even more readily than RSI, because it is calculated on extremes.
- When the period range is narrow the denominator is small, and values jump on the slightest price move.
- The %D smoothing adds lag, so the line crossover happens only after price has already reversed.
Common mistakes in use
- Opening a trade the moment price enters the 80 or 20 zone without waiting for a line crossover. Entering a zone is a state, not an event.
- Applying the fast Stochastic on low-volatility instruments, where it turns into a generator of random signals.
- Mixing the Stochastic and RSI in one system, treating them as independent confirmations. Both measure closely related properties and often err at the same time.
- Forgetting that the calculation uses highs and lows, which means one anomalous spike in the window distorts the values for the entire period.
Who needs this and why
Suitable for working on ranging instruments and for finding entry points inside an already established trend. On an instrument in a sustained directional move, signals against the trend will be predominantly false.
Frequently asked questions
How does the Stochastic differ from RSI?
In the quantities they measure. RSI compares the total strength of gains and losses over a period; the Stochastic measures the position of the close within the period range. The practical consequence: the Stochastic is noticeably faster and reaches the scale limits more often, while RSI is smoother and stays in the middle zone longer.
What are the fast and slow Stochastic?
The fast one uses the raw %K value, the slow one an already smoothed value. The slow variant is used more often because raw %K on real data is too noisy for decision-making.
Why are Stochastic signals often false?
Because by construction the indicator turns on every local change in the range, and most such changes never grow into a move. Hence the standard practice: accept Stochastic signals only in the direction of the trend defined on a higher timeframe.