2007issue C021-10
Anticipating moving-average crossovers one bar ahead
A K-period simple moving average is a convex combination of the newest close and the previous (K-1)-period average, so tomorrow's averages are linear in the still-unknown close. Setting those one-step-ahead averages equal produces a unique threshold close that can be compared with the live close on the current bar.
- A K-period simple moving average is a convex combination of the newest close and the previous (K-1)-period average, so tomorrow's averages are linear in the still-unknown close.
- Setting the two one-step-ahead averages equal yields a unique threshold close; for 20- and 30-period averages it is 58 times the 29-period average minus 57 times the 19-period average.
- Comparing the live close with that threshold is intended to flag, on the current bar, whether the two simple moving averages will meet on the next bar.
- The construction leaves the simple moving average unweighted. The one-bar reduction in lag comes from the algebraic forecast of the meeting price, not from an exponential or weighted average.
Two averages and one unknown close
A moving-average crossover is a signal that fires when a shorter-period simple moving average meets a longer-period simple moving average. It is conventionally read after the close that produces the touch.
A simple moving average is the unweighted mean of the last K closes. Equivalently, it is a convex combination of the newest close and the previous (K-1)-period average. The construction here leaves that definition unchanged and solves for the threshold close: the unique next-session close that would make two chosen simple moving averages equal.
A convex combination of the newest close
A K-period simple moving average can be written as a convex combination of the newest close and the previous (K-1)-period simple moving average, so tomorrow's averages are linear in the still-unknown close.
The unique threshold close
Setting the two one-step-ahead simple moving averages equal and solving for the unknown close yields a unique threshold close of the form (P*(K-1)*MA(K-1) - K*(P-1)*MA(P-1))/(K-P). That value is obtained by rearranging the recursive simple-moving-average update.
For the concrete pair of 20- and 30-period simple moving averages the threshold close simplifies to 58 times the 29-period average minus 57 times the 19-period average.
A flag on the current bar
Comparing the live close with that threshold close is intended to flag, on the current bar, whether the two simple moving averages will meet on the next bar.
The average stays unweighted
The construction leaves the simple moving average unweighted. The one-bar reduction in crossover lag comes from the algebraic forecast of the meeting price, not from switching to an exponential or weighted average.
The same formula on a platform
Platform implementations treat the same threshold-close formula as a plotted level, a predicted-versus-actual cross marker, and a tabulated event log rather than as a rewritten moving-average definition.
A check against the next close
Linear regression, in this setting, is an ordinary least-squares fit of the threshold-close series against subsequent price. It is used as a quantitative check that the solved level tracks the next close rather than as a trading rule.
Average profit per S&P 100 name: one-bar-early TC entry versus waiting for the SMA cross
![On every fast/slow pair in the Wealth-Lab optimizer table, buying when the solved tomorrow-close crossed price (strategy 0) made more average profit per S&P 100 name than waiting for the moving averages themselves to cross (strategy 1). The 15/40 pair led at 454.55 dollars versus 94.04 if you waited; 15/30 even lost money if you waited. Figures are the [Avg] rows from that table, five years of daily bars, 10000 dollars per trade, commissions ignored.](/_next/image?url=https%3A%2F%2Fpub-6bc8cda76b7d4a20825c644751961095.r2.dev%2Fpdf-c849cd8c79c64dc0-body-chart-1600x900.webp&w=3840&q=75)
Strategy 0 buys when tomorrow's close crosses under the live close, holds overnight, and sells the next close. Strategy 1 buys after the SMA cross and sells that same close. Fast lengths 10, 15, 20; slow lengths 30, 40, 50. Fixed 10000-dollar sizing.
All readings on this track · 57 readings
- 1988Constructing moving averages: weights, smoothing and crossovers
- 1988Constructing breadth and average trend states
- 1989Evaluating an always-in-the-market moving-average crossover
- 1989Constructing symmetric market-breadth ratio accumulators
- 1989Objective crossover tests of Fibonacci wave ratios
- 1990Volume-adjusted moving average construction
- 1991Constructing a mechanical crossover on a synthetic price series
- 1991A two-speed breadth reading for intermediate market direction
- 1992A Deutschemark yield map with dual-average and relative-strength timing
- 1992Confirming currency-fund trends with a crossover and a filter
- 1992A moving-average slope filter for crossover signals
- 1992Occupancy and split-sample tests for average crossovers
- 1994Gold-mining seasonality and bond-fund duration switching
- 1994Price oscillator from two moving averages
- 1995Explicit exponential weights and binary entry filters
- 1996Currency futures crossover with slope, bond filter, and stop
- 1996Two-market average crossover entry with a fixed stop
- 1997Construction of a filtered three-average crossover
- 1998Two-group exponential average compression as a trend filter
- 1998Constructing r-squared trend filters with dual lookbacks
- 1998Moving-average length is a habit, not a secret
- 1999Solving the close that triggers a moving-average crossover
- 2000Kagi yang and yin control versus crossover noise
- 2000Constructing simple moving average crossover filters
- 2000Building a vertical-horizontal filter to gate trend signals
- 2000Two-average crossover as a check on trend following
- 2003Stacked exponential-average retracement entries and extreme stops
- 2003Evaluating oscillator thresholds against optimized crossovers
- 2004Constructing a semicycle trend-quality filter
- 2004Commodity subgroups labeled by crossover, support, or convergence
- 2004Full-window evaluation of crossover trend systems
- 2004Two-average trend filters as a classroom critique of indicator stacking
- 2005Three-layer confirmation from a moving-average cross, candles, and Q-stick
- 2005Charting put prices beside an equity breakdown
- 2005Range-gated moving-average crossover construction
- 2007Anticipating a simple-average crossover with a threshold-close
- 2007Anticipating moving-average crossovers one bar ahead
- 2007Lead-series moving-average crossovers with a stochastic and relative strength index
- 2007Next-bar SMA crossover hypotheses from theoretical crossing values
- 2007Anticipating a moving-average crossover before confirmation
- 2007A three-horizon moving-average stack as a construction problem
- 2007Confirming trend with regression slope and r-squared
- 2008Constructing a multi-timeframe smoothed crossover
- 2008Best-day clusters versus trend filters
- 2008Allied markets as a confirmation gate for crossover and breakout signals
- 2008Weekly exponential-average crossover as a mechanical trend case study
- 2010Evaluating a 200-day crossover as long, short, and stand-aside rules
- 2010Read a 10-and-40 trend on two neighboring time frames
- 2012Sampling unit as a first-class parameter on dual simple moving averages
- 2012Constructing index-ETF entries from volatility-index persistence
- 2013Moving-average baselines versus crossover signals
- 2013Constructing a typical-price and heikin-ashi crossover as one mechanical procedure
- 2016A three-gate checklist for longs after a sharp drop
- 2016Weekly inflation-ratio crossover for commodity regimes
- 2017Normalized Laguerre zero-axis warning as a two-marker construction
- 2019Range-weighted construction of an adaptive exponential moving average
- 2020Construct a second-pullback entry after a moving-average crossover