Momentum oscillator

Stochastic Oscillator

A momentum oscillator comparing close to the recent high-low range.

What is Stochastic Oscillator?

The Stochastic Oscillator measures where the current close sits within the recent high-low range, on a 0–100 scale. The idea: in an uptrend closes cluster near the highs, in a downtrend near the lows. It's used to spot momentum extremes and turns.

How it works

The %K line measures the close relative to the lookback range; %D is a moving average of %K. Readings above 80 are overbought and below 20 oversold. Signals come from %K crossing %D, especially inside those zones, and from divergence against price.

How traders use it

  • Overbought/oversold: watch for turns from above 80 or below 20.
  • %K/%D crossovers: momentum-shift signals.
  • Divergence: price/stochastic disagreement warns of reversals.
  • Trend filter: only take signals in the direction of the higher-timeframe trend.

Build Stochastic Oscillator without code in Algovex

Algovex provides the Stochastic Oscillator as a node with %K and %D outputs. Wire a crossover-in-zone trigger into entries, backtest, and export to code, no scripting needed.

Key parameters

ParameterWhat it does
kLengthLookback period for %K (classic 14).
kSmoothingSmoothing applied to %K.
dLengthMoving-average period for the %D line (classic 3).

Frequently asked questions

What is the difference between Stochastic and RSI?

Both are momentum oscillators, but RSI measures the size of recent gains vs losses, while Stochastic measures where the close sits in the recent range. They often agree but can diverge; Algovex offers both as nodes.