2010issue C0367-79
Construct a bandpass, cycle, and trend mode detector
A bandpass-filter built from midpoint price, a 20-bar dominant-cycle center, and a delta half-bandwidth retains a narrow swing. A two-period-length average of that output is then compared with peak and valley memories so cycle-mode and trend-mode are assigned as an explicit filter-and-threshold result.
- A bandpass-filter can be built from midpoint price, a 20-bar dominant-cycle center, and a half-bandwidth input so that only a narrow range of cycle lengths is retained.
- With the default half-bandwidth of 0.1 around a 20-bar center, the construction is described as passing roughly 18- to 22-bar components and attenuating both slower trend and faster noise.
- Widening delta makes the filtered series more responsive to changes in cycle length. A very narrow setting lengthens filter memory and can leave residual ringing after a large impulse.
- The same bandpass recurrence feeds a two-period-length average that is compared with fraction-scaled peak and valley memories, so cycle-mode and trend-mode are threshold classifications rather than a hindsight chart reading.
Treat mode as a filter-and-threshold result
The supplied construction treats cycle versus trend identification as an objective filter-and-threshold problem rather than a hindsight chart reading of whether a market is swinging or trending.
The named parts are a bandpass-filter, a dominant-cycle center period, and a trend-filter that reads a slower residual or thresholded mean rather than the retained swing.
Build the bandpass from midpoint price
A bandpass-filter keeps a chosen range of periodic components in ordered price observations and attenuates slower trend and faster noise.
The filter can be built from midpoint price, a 20-bar center period, and a half-bandwidth input so that only a narrow range of cycle lengths is retained.
That 20-bar center is the dominant-cycle: the bar-count periodicity around which the bandpass is centered so that the retained swing can be measured.
Set delta around the center period
Delta is the input that sets the approximate half-bandwidth of the bandpass around the chosen period.
With the default half-bandwidth of 0.1 around a 20-bar center, the construction is described as passing roughly 18- to 22-bar components and attenuating both slower trend and faster noise.
Widening the half-bandwidth makes the filtered series more responsive to changes in cycle length, while a very narrow setting lengthens filter memory and can leave residual ringing after a large impulse.
Classify cycle mode and trend mode
The same recurrence used for the bandpass also feeds a two-period-length average of the filter output that is compared with fraction-scaled peak and valley memories to color or classify bars as above or below those thresholds.
That step is an empirical-mode-decomposition: a construction that separates a bandpass output into a local cycle residual and a slower mean used for mode classification.
Cycle-mode is a market state in which a retained swing around a chosen period is large enough, relative to its own peak and valley memory, to treat as oscillatory. Trend-mode is a market state in which the same residual or averaged bandpass output sits outside those cycle thresholds.
A trend-filter is the rule that treats that slow residual or thresholded bandpass mean as the current trend mode rather than a tradable cycle.
Microsoft daily price on the mode-detector chart

Approximate readings from the priced pane of the 11 January 2010 MSFT D1 screenshot. Dates left of the first printed tick (1 April 2008) follow the six-month axis spacing. The three indicator panes were too dark and compressed to digitize, so only dollar price is recovered.
All readings on this track · 9 readings
- 1994Constructing a cycle-aligned bandpass from paired lowpass filters
- 2008A bandpass filter bank for dominant cycle construction
- 2010Construct a bandpass, cycle, and trend mode detector
- 2015Constructing a one-parameter bandpass oscillator from two-bar momentum
- 2015Bandpass cycle models cannot promise certainty
- 2016Dual exponential Super Passband filter construction
- 2017A three-flag swing window with a bandpass midpoint
- 2019Building a three-harmonic Fourier series cycle wave
- 2019Lock a band, take a short lead, then gate empty readings