2001issue C041-6
Nonlinear Ehlers filter construction from momentum and distance weights
A nonlinear Ehlers filter forms each coefficient from a chosen statistic of the price series, multiplies those coefficients by the corresponding prices, and outputs the ratio of that numerator to the coefficient sum. The same weighted-average shell accepts a five-bar absolute change or a distance coefficient.
- The nonlinear construction forms each coefficient from a chosen statistic of the price series, multiplies those coefficients by the corresponding prices, and outputs the ratio of that numerator to the coefficient sum.
- A worked example uses a five-bar absolute price change as the coefficient statistic and a default lookback length of 15 samples on median price, the midrange of high and low.
- The same weighted-average shell accepts a distance coefficient formed by summing squared differences between the current price and each earlier price in the lookback.
- Editorial: rebuilding those coefficients from the chosen statistic at each bar is what makes the smoother a trend filter, an adaptive filter, and a testable momentum strategy.
Coefficients from a chosen statistic
The nonlinear construction forms each coefficient from a chosen statistic of the price series, multiplies those coefficients by the corresponding prices, and outputs the ratio of that numerator to the coefficient sum.
That procedure is the nonlinear Ehlers filter: a weighted-average construction whose coefficients come from a selected statistic, then normalizes the weighted prices by the sum of those coefficients. The coefficient sum is the total of the current lookback of coefficients and is the denominator of the filter.
A five-bar change on median price
A worked example uses a five-bar absolute price change as the coefficient statistic and a default lookback of 15 samples on the midrange of high and low. Median price is that midrange, taken as the average of high and low.
Lookback length is the number of past samples that enter both the coefficient vector and the weighted average. In the worked example that length is 15.
Distance weights in the same shell
The same weighted-average shell accepts a distance coefficient formed by summing squared differences between the current price and each earlier price in the lookback.
A generic implementation treats the coefficient statistic as an input, so replacing an absolute five-bar midrange change with a distance-squared function yields the distance-coefficient variant inside the same procedure.
A spreadsheet layout
A spreadsheet construction first builds the squared-difference series, then forms the filter as the product-sum of price and those coefficients divided by the coefficient sum, copying the row downward once five squared-difference values exist.
The same ratio on other platforms
Independent platform reconstructions keep the same ratio of weighted price to coefficient sum, including a midrange price series, a 15-bar summation window, and a coefficient line that can be an absolute five-bar change or a summed squared-distance term.
Distance-weighted Ehlers filter versus daily median price

Each coefficient is the five-bar sum of squared differences from the current median price; this sheet then uses a five-term weighted average, shorter than the Length=15 window in the EasyLanguage listing.
Editorial: three uses of one construction
Editorial: TradersWeek reads this construction as a trend filter, an adaptive filter, and a testable momentum strategy, because the same weighted-average shell rebuilds its weights from a chosen statistic at each bar. That reading is editorial and is not a claim of the archive workflow.
A trend filter is a smoother that weights recent price, volume, or breadth observations so the output can be compared with a later out-of-sample path. The nonlinear Ehlers filter is that smoother: it weights recent prices by the current coefficients and returns the normalized ratio.
An adaptive filter is a filter whose coefficients are recomputed from a chosen statistic of the same series, so the weights change as the data change. Forming each coefficient from a chosen statistic, and treating that statistic as an input, is that recomputation.
A momentum strategy is a complete entry, exit, and abstention procedure whose signals come from a momentum-based coefficient rule and a defined holding period. Editorial: the five-bar absolute price change is a momentum-based coefficient rule. Placing that rule inside a defined holding period makes entry, exit, and abstention testable as one procedure.
All readings on this track · 9 readings
- 1982Constructing moving averages with weights, alignment, and adaptive lookbacks
- 1990Constructing adaptive filters from equal-weight averages
- 2000Cycle-scaled lookbacks for a channel-breakout rule
- 2000When charting code breaks the adaptive trendline
- 2001Nonlinear Ehlers filter construction from momentum and distance weights
- 2001How a fixed smoother becomes a living parameter surface
- 2005A three-part workshop for adaptive-filter length search
- 2010Rebuilding an exponential average as a bounded error-correcting filter
- 2018Assembling a recursive median oscillator as a two-stage adaptive filter