2005issue C081-7
Current-bar versus prior-bar range construction for the stochastic oscillator
The stochastic oscillator locates the close inside a high-low envelope, then forms a raw ratio, a short summed quick line, and a short averaged slow line. A one-bar displacement decides whether that envelope includes the current bar, which changes what the oscillator can show on a breakout.
- The stochastic construction locates the close inside a high-low envelope of stated length, then forms a raw ratio, a short summed quick line, and a short averaged slow line.
- A displacement of zero includes the current bar in the envelope, while a displacement of one uses the prior-bar high and low so the same construction can be compared side by side.
- The price-band oscillator is the same close-to-low percentage of the band width, plotted without the extra stochastic smoothing steps.
- Including the current day in the range is presented as limiting how freely the oscillator can move when a breakout occurs.
How the oscillator is assembled
The stochastic oscillator is a bounded oscillator that locates the close inside a lookback high-low envelope and may then smooth that location over a short window. The construction first places the close inside an envelope of stated length, then forms a raw ratio, a short summed quick line, and a short averaged slow line.
The raw channel is the unsmoothed close-to-range ratio taken from the current-bar high-low envelope. The quick line is a short summation of close-to-low distances divided by the matching summation of range widths. The slow line is a short moving average of the quick line.
The supplied implementations use a 14-bar lookback and 3-bar summation or averaging windows, with a zero-range guard so the ratio is computed only when the envelope has width.
Displacement and the price band
A displacement input of zero includes the current bar in the envelope. A displacement of one uses the prior-bar high and low so the same formulas can be compared side by side.
The price band is the highest high and lowest low over a stated lookback, optionally taken from the prior bar rather than the current bar. The price-band oscillator is the same close-to-low percentage of the band width, plotted without the extra stochastic smoothing steps.
Reference lines at 0 and 100 mark when the close sits at the bottom or top of the constructed range.
Why the one-bar shift matters on a breakout
Side-by-side comparison is the point of the displacement input. With displacement at zero, the current bar belongs to the range. With displacement at one, the envelope is the prior-bar high and low, and the close is still measured against that older band.
TradersWeek editorial reading: the shift does not change the close-to-low percentage itself. It changes which bars define the band edges, and that is what the oscillator can show when price leaves the prior range.
McKesson prior-bar price-band oscillator

Length 14, Displacement 1 in the published eSignal study. Intermediate points are approximate raster readings rounded to the nearest whole oscillator point.
All readings on this track · 42 readings
- 1987Stochastic fast and slow construction as a rebuildable stack
- 1989Building the stochastic oscillator from close location
- 1990Monthly stochastics as a multi-year bond regime filter
- 1990Walk-forward screen for yen indicator rules
- 1990Slow stochastic construction for index pullback entries
- 1991Random Walk Index construction with an adaptive lookback
- 1991Building a two-stage stochastic oscillator from close location
- 1992Constructing fast and slow stochastic oscillator lines
- 1992Constructing nested stochastic lookbacks
- 1994Construct the four-state price-volume rank before filtering it
- 1996Crowded stochastics, false breakouts, and hidden stops
- 1997Fade and follow entries from stochastic extremes
- 1998Oversold confirmation as a staged rule-based-entry case
- 1999Constructing regular and slow stochastic oscillators
- 2001Construct a variable-interval simple moving average from stacked extremes
- 2001Threshold RSI and stochastic setups with next-bar stops
- 2001Two tests of a rate-adjusted earnings-yield gap
- 2002Constructing a two-line stochastic from a range-normalized close
- 2002Inspect mechanical stochastic daytrade rules on one bar
- 2003Constructing an adaptive stochastic RSI
- 2003Four parameters that construct a stochastic oscillator
- 2004Volume breakout as signal, pullback as entry
- 2004A first currency-market checklist with two averages and a slow stochastic
- 2005Shared-scale cycle indexes with companion oscillators
- 2005Current-bar versus prior-bar range construction for the stochastic oscillator
- 2005Two-session moving-average pullback short
- 2006Market condition as a permission layer for moving averages and oscillators
- 2008Lock the stop at support before sizing a stochastic entry
- 2010Construct a center-line volume oscillator and read it with a stochastic oscillator
- 2010Sharpened RSI turns with rainbow averages and a slow stochastic
- 2011Build a Spearman rank oscillator from ordered closes
- 2012Gold as a regime-dependent hedge in the euro-area crisis
- 2012Pairing moving averages with variable-length stochastics
- 2014Two-leg stochastic stress oscillator as a rebuild drill
- 2014Ingress dates as price bases for relative strength, stochastics, and moving averages
- 2017Constructing a dual EMA stochastic from range normalization
- 2018Constructing a two-stage stochastic RSI for comparable price-oscillator divergences
- 2018Combining a weekly stochastic, a long moving average, and two-day resistance
- 2018Weekly and daily stochastic readings with a long moving average and support
- 2018A confirming workflow for rotating from discretionary to staples
- 2019Stochastic scan thresholds, averages, and formula syntax
- 2020Constructing Slow %K as a two-stage helper