1990issue C121-2
Constructing stochastic K and D lines and divergence cues
A stochastic oscillator places the latest close between the lowest low and highest high of a chosen lookback and scales that placement from 0 to 100. This article assembles raw percent K from a five-bar high-low window, derives percent D as a three-bar smoothed companion, and keeps the zone-and-cross cue and price-indicator divergence as two constructions on the same sampling interval.
- A stochastic oscillator is a 0-to-100 reading that locates the latest close inside a chosen window of the highest high and lowest low.
- Raw percent K uses a five-bar lookback. Percent D is the three-bar smoothed companion formed from summed close-to-low distances over summed high-to-low ranges.
- A zone-and-cross cue counts a percent-K crossing of percent D only after both lines have already entered the overbought zone or the oversold zone.
- Price-indicator divergence is a separate cue: a market low or market high that percent D does not confirm.
A range-normalized close
A stochastic oscillator is a 0-to-100 reading that locates the latest close inside a chosen window of the highest high and lowest low. The construction assumes that closes gather near range lows while price is falling and near range highs while price is rising. The same construction can be applied to monthly, weekly, or intradaily bars.
Assembling raw percent K
In the worked construction, raw percent K uses a five-bar lookback. It is 100 times the current close minus the five-bar lowest low, divided by the five-bar high-low span. That unsmoothed value is computed from the current close and the lookback extremes.
Deriving percent D
Percent D is the three-bar smoothed companion of percent K. It is formed as 100 times the three-period sum of close-minus-lowest-low divided by the three-period sum of highest-high-minus-lowest-low.
Plotting the two lines
When the two lines are plotted, the vertical axis is the stochastic percentage and the horizontal axis is time. The overbought zone is the upper band of the oscillator scale, conventionally 80 and above. The oversold zone is the lower band, conventionally 20 and below.
The zone-and-cross cue
A percent-K crossing of percent D is treated as a trend-change cue only after both lines have already entered the overbought zone or the oversold zone. That restricted crossing is the zone-and-cross cue.
Price-indicator divergence
A second cue is price-indicator divergence between price and percent D: a market low that percent D does not confirm, or a market high that percent D does not confirm. A new price extreme that the percent-D line does not confirm is treated as a separate reversal hypothesis.
All readings on this track · 16 readings
- 1989Volume confirmation windows and exponential average construction
- 1990Constructing stochastic %K and %D from range position
- 1990Build a weekly leading sector composite from scaled transports and financials
- 1990Constructing stochastic K and D lines and divergence cues
- 1993Relative strength index events depend on the chosen input combination
- 1995Constructing a dual-horizon force index
- 1996Building a range-normalized divergence index from relative strength index
- 1998Treat RSI as a testable filter rather than a trigger
- 1999Primary-cycle windows, then stochastic confirmation
- 1999Stochastic rules versus buy and hold
- 2001Constructing confirmation filters for RSI overbought and oversold extremes
- 2003Constructing divergence-equivalent relative strength index and stochastic oscillators
- 2003Reverse-engineered RSI as a next-close projection
- 2003Scoring open versus resolved relative strength divergences
- 2003Bull-and-bear-balance from OHLC bar patterns
- 2003Constructing bull and bear balance from session paths