2014issue C0651-56
Constructing a multi-window slope divergence entry
This note records how to construct long, short, and exit signals from a vote of linear-regression slopes on a stochastic momentum series and on the close.
- Compare linear-regression slopes of a stochastic momentum series and of the close over three lookback windows to detect disagreement in direction.
- Issue a long only when at least two momentum slopes are negative and at least two price slopes are positive. Issue a short only when those votes reverse.
- Close both longs and shorts when every price slope and every momentum slope is above zero, or when every one of those slopes is below zero.
- Change sensitivity by requiring one, two, or three simultaneous window divergences, or by restricting the book to long-only. Only the sign of each slope relative to zero enters the decision.
A vote across three slope windows
The procedure detects disagreement between a stochastic momentum series and closing-price direction. It does this by comparing linear-regression slopes of both series over three lookback windows.
Default construction uses a 25-period stochastic. Slope windows of 5, 12, and 14 bars are applied to both the oscillator and the close.
Long, short, and exit rules
A long signal is issued only when at least two of the three momentum slopes are negative and at least two of the three price slopes are positive.
A short signal is issued only when at least two of the three momentum slopes are positive and at least two of the three price slopes are negative.
Longs and shorts are closed when every price slope and every momentum slope is above zero, or when every one of those slopes is below zero.
Default construction and platform ports
The same slope-vote rules can be rebuilt as a backtestable strategy in charting platforms. That includes single-symbol tests and multi-symbol portfolio runs.
SPY daily close during the Excel three-window slope vote

Workbook defaults in the screenshot: fast momentum on, stochastic length 10, slope windows 5/8/13, entry after one divergence. The lower pane plots six price and momentum slopes on a shared zero line, but those traces overlap too tightly at this resolution to digitize as separate series.
How to change sensitivity
Sensitivity can be changed by requiring one, two, or three simultaneous window divergences before a trade is allowed. The book can also be restricted to long-only.
Decisions use only the sign of each slope relative to zero. Unequal numerical scales between price slopes and momentum slopes do not change the entry or exit logic.
All readings on this track · 51 readings
- 1984Half-cycle differencing for momentum signals
- 1987Relative strength evaluation under competing optimization criteria
- 1988Weekly MACD as a two-clock momentum confirmation stack
- 1989Equal-weight zero-cross from smoothed spreads
- 1989Testing relative-strength-index reversal rules against trend continuation
- 1989Smoothed three-day futures filter for index option bounces
- 1989Cycle-length windows for momentum, Relative Strength Index, and stochastic construction
- 1991Filtered rally magnitude as a bull-regime breakout
- 1992Constructing true strength from double-smoothed momentum
- 1992Constructing a double-smoothed true strength index
- 1993When momentum structure and breadth break together
- 1993Constructing double-smoothed range and momentum oscillators
- 1993Constructing a two-parameter relative momentum index
- 1993Building a bounded momentum oscillator with RSI smoothing
- 1993Two-speed oscillators with divergence and trendline gates
- 1993Constructing a relative momentum index from the relative strength index
- 1994Constructing daily advance-decline breadth tools
- 1994Building a composite regime score from monetary climate and weekly trend
- 1994Averaging Relative Strength Index and the stochastic oscillator into one reversal oscillator
- 1995Dividend-yield regression as a hold versus momentum gate
- 1996Jump and hold filters for long-term Treasury yield direction
- 1997Constructing extendedness from a 10 percent swing filter
- 1997A range-expansion oscillator that can refuse its own stretch
- 1997RSI trend permission and Fibonacci pullback rules
- 1998Nested midpoint construction for a range-normalized oscillator
- 1999Evaluating Relative Strength Index momentum with zero-line and threshold rules
- 1999Treat RSI and momentum as three mechanical procedures
- 2000Thrust strength figure from moving-average swings
- 2001Constructing a non-range-bound balance of market power score
- 2004Cleaned breadth oscillator and new-high divergence: a swing-market case file
- 2004Evaluating advance-issues-momentum on a fixed-symbol-basket
- 2004Constructing a trend filter from two adjacent high-low windows
- 2006A dollar-versus-commodity extreme as a regime case
- 2008Zero-centered stochastic bands and bracket stops
- 2012Evaluating engulfing momentum across hold windows
- 2012Staged stops as one mechanical entry and exit procedure
- 2012Stacking a relative-strength-index forecast, a trend filter, and long-only momentum
- 2013Constructing fair-value filters from averages and momentum
- 2014Constructing a multi-window slope divergence entry
- 2015Bandedge trend filter construction with inverse crossover rules
- 2017Opposite rules for index price and volatility momentum
- 2018A three-state overlay that colors a trend only after the line clears the bar
- 2018Half-cycle relative-strength index with a Fisher map for cyclic reversals
- 2018Emotion as a rule input when momentum breaks
- 2018Two-bar body expansion as a momentum breakout construction
- 2019Pair a two-day high breakout with a volume-weighted exit on the same chart
- 2020Building reflex and trendflex cross and extreme entry rules
- 2020Construct a dual-series price momentum oscillator overlay
- 2020A multi-timeframe stochastic as a panel of weekly voters
- 2020Centerline crossovers that compare index momentums
- 2020Multi-timeframe stochastic voting as one mechanical rule