Skip to main content
Track Trend filter
20 / 33
Library

2006issue C121-11

A stochastic oscillator gated by a long-term exponential average

This construction lesson pairs a smoothed stochastic oscillator with a 271-period exponential average of the close so the average can permit a setup and can also force an exit.

  • Long entries fire when the stochastic reading is below 30 and the close is above the 271-period exponential moving average.
  • Short entries fire when the stochastic reading is above 70 and the close is below that same average.
  • Either side exits when the oscillator reaches the opposite threshold or when the close crosses back through the average.
  • The oscillator uses a 7-period raw calculation and a 3-period smoothing term, and all four rules are evaluated on the close.
Entries in this reading3 entries

Two roles in one rule set

The construction joins a bounded oscillator to a slow exponential average of closing prices. The oscillator locates the latest close inside a recent high-low range, then smooths that reading so oversold and overbought crossings can be treated as explicit entry and exit thresholds.

The moving average is a 271-period exponential average of the close. It supplies the long-horizon trend line used both as a permission filter and as an independent exit condition.

How the trend filter admits a setup

The trend filter admits long setups only when price is above the average and short setups only when price is below it. It can also force an exit when price crosses back through the average.

SMAF-1 cumulative return versus the S&P 500

A trader should see the book go sideways from late 2000 through early 2003, when the long-term average refused long setups through the bear, then pull far ahead of the S&P 500 on the 2003–06 advance. The path was read from the plotted equity curves on this figure; the last readings match the printed IRR figures of 423 and 191.4.
A trader should see the book go sideways from late 2000 through early 2003, when the long-term average refused long setups through the bear, then pull far ahead of the S&P 500 on the 2003–06 advance. The path was read from the plotted equity curves on this figure; the last readings match the printed IRR figures of 423 and 191.4.SMAF-1 versus SPX · 31 Dec 1993–22 Aug 2006 · 1993-12-31T00:00:00.000Z to 2006-08-22T00:00:00.000Z

AIQ tested the long side only, with extra market-index and group filters and a five-position stock book, not the bare single-instrument long/short rules. Path values between labeled dates are approximate raster readings.

Oscillator lookback and thresholds

The stochastic component is specified with a 7-period raw calculation and a 3-period smoothing term.

One implementation encodes the 30 and 70 thresholds as a 20-point band around the oscillator midpoint of 0.5.

Long entry and exit

Long entries fire when the stochastic reading is below 30 and the close is above the 271-period exponential moving average.

Long positions exit when the stochastic reading rises above 70 or the close falls below the 271-period exponential moving average.

Short entry and exit

Short entries fire when the stochastic reading is above 70 and the close is below the 271-period exponential moving average.

Short positions exit when the stochastic reading falls below 30 or the close rises above the 271-period exponential moving average.

Evaluated on the close

All four entry and exit rules are evaluated on the close, so the system can be stated as a fully mechanical rule set without discretionary overlays.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
20 of 33 in the Trend filter track
201022-29 pp.Next on Trend filterA construction test for a modified volume-price trend filterThe construction looks for interday staged buying or selling of a large stake from price and volume, comparing prints across successive days rather than the same day's open and close.
All readings on this track · 33 readings
  1. 1988Opening-range brackets, a two-bar trend filter, and bounded stops
  2. 1990Bezier-curve price trend filter
  3. 1992Constructing a damping-index trend filter
  4. 1992Building a random walk index trend filter
  5. 1992Phase diagrams for moving-average trend filters
  6. 1993Volume-weighted change smoothing and trend ranking
  7. 1993Concurrent highest-low filter with a largest-low-fall trigger
  8. 1994Unit-invariant trend filters and the c-test
  9. 1995Constructing cup and cap entries with a three-bar net line
  10. 1997Why a daily timing evaluation depends on interval, lookbacks, and the fitting objective
  11. 2001A volume budget clock for trend-segment construction
  12. 2001Keep three jobs separate when you test a composite score
  13. 2002Evaluating the weekly four-percent close filter as a market-state procedure
  14. 2003Constructing a confirmed zigzag trend filter
  15. 2004Decompose high, low, and close into separate forecast streams
  16. 2005Three-state moving-average breakout bar coloring
  17. 2005Constructing a volume and move-adjusted trend filter
  18. 2005A fifty-day average breakout as a trend permission filter
  19. 2005Current-bar inclusion can mute a stochastic channel break
  20. 2006A stochastic oscillator gated by a long-term exponential average
  21. 2010A construction test for a modified volume-price trend filter
  22. 2011Constructing a Spearman rank trend filter
  23. 2013Constructing a repeated-median slope as a resistant trend filter
  24. 2014Combining a relative-strength index and trend filters for oversold setups
  25. 2014Price-rooted lookbacks for a relative strength index, a moving average, and a trend filter
  26. 2015Evaluating next-session intermarket range forecasts
  27. 2018Read the intermarket weight matrix first, then the predicted moving-average filter
  28. 2018Constructing the stiffness trend filter from moving-average holds
  29. 2018The averaging kernel and the lagged trend gate are separate specifications
  30. 2019A trend filter is not ready to compare until portfolio constraints are written down
  31. 2019Lookback, threshold, and position-capacity for a stiffness trend-filter
  32. 2020Combining a trend filter with a moving average and a stochastic oscillator
  33. 2020Constructing a relative-strength oscillator with a rank-agreement trend filter
All 137 readings tagged Trend filter
Also on Trend filter5 readings