Indicators/Momentum

Stochastic Oscillator

Where the close sits within the recent high-low range, from 0 (at the low) to 100 (at the high), with a smoothed signal line.

Stochastic 14 3AAPL · daily
Stochastic on a daily AAPL chart in StockVyze

What it measures

The Stochastic Oscillator, developed by George Lane, locates the close within the range of the last period bars (14 by default):

OutputDefinition
percent_k100 × (close − lowest low) / (highest high − lowest low)
percent_dSimple average of percent_k over signal_period bars (3 by default)

A reading of 100 means the bar closed at the top of the recent range; 0 means at the bottom. StockVyze's percent_k is the unsmoothed "fast" %K.

How to read it

  • 80 and 20. Readings above 80 are conventionally overbought and below 20 oversold. In strong trends the oscillator can stay near an extreme for a long time.
  • Crosses. percent_k crossing above percent_d from below 20 is a common bullish signal; crossing below from above 80, bearish.
  • Divergence. A lower low in price with a higher low in the oscillator suggests downside momentum is weakening.

Common mistakes

  • Fading every extreme. In an uptrend, closes near the top of the range are expected.
  • Using the fast line alone. The unsmoothed %K is noisy; the signal line or a longer period filters it.

Use it in a scan

A bullish cross of the fast line over the signal line while the signal is still below 20:

cross_up(stoch_k(14), stoch_d(14, 3)) and stoch_d(14, 3) < 20

Inputs

InputTypeDefaultRange
periodinteger142 – 300
signal_periodinteger32 – 100

Outputs

percent_k, percent_d

References