Skip to main content
Track Stochastic oscillator
15 / 42
Library

2001issue C071-5

Construct a variable-interval simple moving average from stacked extremes

This article shows how a simple moving-average lookback is set in proportion to a composite extreme score and a short-and-long length pair. The pair is treated as usable only when it stays in place across historical windows.

  • The variable-interval construction interpolates a simple moving-average lookback between the short and long members of a length pair, using the long length at a composite extreme-score high and the short length at a score low.
  • The composite extreme score sums, across lookbacks 2 through 35, each of the latest 250 price differences ranked from 0 to 1 inside that lookback's min-max range, because a single-horizon relative-strength-index or stochastic-oscillator reading can sit at an extreme while a neighboring horizon does not.
  • The daily lookback is the short length plus the pair span times the composite score's 0-to-1 position in its own range, rounded to an integer, so a 10-and-40 pair at mid-range yields 25.
  • Length pairs are chosen by exhaustive historical comparison and kept only when they change slowly across windows. The plotted average is then marked up or down from the prior bar as the directional reading.
Entries in this reading3 entries

What the construction sets

The variable-interval construction sets a simple moving-average lookback in proportion to a composite extreme score. It uses the long member of a length pair at the score high and the short member at the score low.

Here a moving average is a simple average of ordered prices whose integer lookback is interpolated each bar between a short bound and a long bound instead of being held fixed. A length pair is that short lookback and long lookback. The pair is chosen by comparing many pairs on recent history.

Why the score stacks many horizons

A relative-strength-index is a single-horizon overbought/oversold oscillator that scores up versus down closes over one fixed lookback. A stochastic-oscillator is a single-horizon overbought/oversold oscillator that places the close inside one fixed high-low window. Both are used here as the baseline families a stacked-interval score is built to replace.

A single-horizon relative-strength-index or stochastic-oscillator reading can sit at an extreme while a neighboring horizon does not. That is why the construction sums many intervals rather than relying on one.

How the composite extreme score is built

For each lookback from 2 through 35, each of the latest 250 price differences is mapped to a 0-to-1 position in that lookback's min-max range. Those positions are summed across lookbacks to form the composite extreme score.

Interpolate a length from the pair

The daily lookback is the short length plus the pair span times the composite score's 0-to-1 position in its own range, rounded to an integer. A 10-and-40 pair at mid-range therefore yields 25.

VIMA oscillator from stacked 2-, 3- and 4-day extremes

The stacked extreme score in the sidebar worksheet crests at 3.00 on day 11, when the 20-day example price is most extended, then falls to 0.23 on day 17 through the selloff before a small rebound. Each point is the sum of the 2-, 3- and 4-day normalized differences from that table, which is the input later used to interpolate a short/long moving-average pair.
The stacked extreme score in the sidebar worksheet crests at 3.00 on day 11, when the 20-day example price is most extended, then falls to 0.23 on day 17 through the selloff before a small rebound. Each point is the sum of the 2-, 3- and 4-day normalized differences from that table, which is the input later used to interpolate a short/long moving-average pair.Day

The published worksheet stacks only intervals 2, 3 and 4 over 20 closes so the arithmetic stays readable. The live VIMA oscillator repeats the same min–max normalization for every interval from 2 through 35 across the latest 250 datapoints.

Read the pair map

On the pair map the diagonal marks equal lengths. Pairs below the diagonal shorten the average as the composite score rises and lengthen it as the score falls. Pairs above the diagonal reverse that mapping.

Keep a pair only when it stays put

Length pairs are chosen by exhaustive historical comparison. The construction is treated as usable only when the preferred pair changes slowly across windows rather than jumping. Pair-stability is that construction gate: a historically preferred length pair must stay in roughly the same place across successive windows before the variable average is treated as usable.

Three 250-session windows on a major equity index, with endpoints 50 sessions apart, selected the same length pair and showed similar pair-map geography. The method reads that pattern as slow pair drift.

Mark the average up or down

The plotted variable average is marked up when its value exceeds the prior bar and marked down when it is below the prior bar. That one-bar sign is the construction's directional reading.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
15 of 42 in the Stochastic oscillator track
20011-4 pp.Next on Stochastic oscillatorThreshold RSI and stochastic setups with next-bar stopsCrossing into an oversold or overbought band is a presignal, not an order. Occupancy alone is a different error from waiting for a later confirmed exit from that zone.
All readings on this track · 42 readings
  1. 1987Stochastic fast and slow construction as a rebuildable stack
  2. 1989Building the stochastic oscillator from close location
  3. 1990Monthly stochastics as a multi-year bond regime filter
  4. 1990Walk-forward screen for yen indicator rules
  5. 1990Slow stochastic construction for index pullback entries
  6. 1991Random Walk Index construction with an adaptive lookback
  7. 1991Building a two-stage stochastic oscillator from close location
  8. 1992Constructing fast and slow stochastic oscillator lines
  9. 1992Constructing nested stochastic lookbacks
  10. 1994Construct the four-state price-volume rank before filtering it
  11. 1996Crowded stochastics, false breakouts, and hidden stops
  12. 1997Fade and follow entries from stochastic extremes
  13. 1998Oversold confirmation as a staged rule-based-entry case
  14. 1999Constructing regular and slow stochastic oscillators
  15. 2001Construct a variable-interval simple moving average from stacked extremes
  16. 2001Threshold RSI and stochastic setups with next-bar stops
  17. 2001Two tests of a rate-adjusted earnings-yield gap
  18. 2002Constructing a two-line stochastic from a range-normalized close
  19. 2002Inspect mechanical stochastic daytrade rules on one bar
  20. 2003Constructing an adaptive stochastic RSI
  21. 2003Four parameters that construct a stochastic oscillator
  22. 2004Volume breakout as signal, pullback as entry
  23. 2004A first currency-market checklist with two averages and a slow stochastic
  24. 2005Shared-scale cycle indexes with companion oscillators
  25. 2005Current-bar versus prior-bar range construction for the stochastic oscillator
  26. 2005Two-session moving-average pullback short
  27. 2006Market condition as a permission layer for moving averages and oscillators
  28. 2008Lock the stop at support before sizing a stochastic entry
  29. 2010Construct a center-line volume oscillator and read it with a stochastic oscillator
  30. 2010Sharpened RSI turns with rainbow averages and a slow stochastic
  31. 2011Build a Spearman rank oscillator from ordered closes
  32. 2012Gold as a regime-dependent hedge in the euro-area crisis
  33. 2012Pairing moving averages with variable-length stochastics
  34. 2014Two-leg stochastic stress oscillator as a rebuild drill
  35. 2014Ingress dates as price bases for relative strength, stochastics, and moving averages
  36. 2017Constructing a dual EMA stochastic from range normalization
  37. 2018Constructing a two-stage stochastic RSI for comparable price-oscillator divergences
  38. 2018Combining a weekly stochastic, a long moving average, and two-day resistance
  39. 2018Weekly and daily stochastic readings with a long moving average and support
  40. 2018A confirming workflow for rotating from discretionary to staples
  41. 2019Stochastic scan thresholds, averages, and formula syntax
  42. 2020Constructing Slow %K as a two-stage helper
All 170 readings tagged Stochastic oscillator
Also on Stochastic oscillator5 readings