This script implements the Adaptive SuperSmoother by John F. Ehlers, as presented in the “Improved Filter Performance” article from the September 2026 edition of the TASC Traders’ Tips. The script demonstrates a simple technique to adapt the SuperSmoother’s critical period to improve the filter’s responsiveness.
█ CONCEPTS
In his article, Ehlers explains that many adaptive smoothers rely on Exponential Moving Averages (EMAs) at their core. Typically, these smoothers dynamically adjust an EMA’s smoothing factor (alpha) based on specific volatility measures, often to reduce sensitivity during periods of volatile or choppy price movements. However, he suggests that EMAs are not great filters; they are first-order smoothers that offer very limited reduction, or attenuation, of high-frequency (low-period) signals in the dataset. For example, for an EMA with a critical period of 12 bars, the maximum gain reduction of smaller-period cycles is only about -17 decibels (dB). At this level of attenuation, a significant amount of high-frequency noise remains in an EMA-filtered series.
Ehlers proposes that traders should use the SuperSmoother instead of an EMA in most applications, including adaptive filtering. The SuperSmoother is a second-order filter. It has a second-degree polynomial in its transfer function and a zero of transmission at the Nyquist frequency. Thanks to these characteristics, the SuperSmoother offers a substantially greater reduction of higher frequencies than an EMA. Additionally, Ehlers notes that the filter’s computational lag is not perceptibly greater than that of an EMA, further underscoring its usefulness as an improved filter.
Ehlers notes that there are many ways to make the SuperSmoother adaptive to market conditions. He demonstrates his preferred method, dubbed the Adaptive SuperSmoother, in the article’s code. Rather than tuning the smoothing factor of an EMA based on a volatility measure, the Adaptive SuperSmoother dynamically adjusts the critical period of one SuperSmoother based on the rate of change (ROC) in another. The steps to calculate the filter are as follows:
- Calculate a SuperSmoother filter using a fixed critical period.
- Measure the one-bar ROC in the first filter, and calculate the RMS (Root Mean Square) of the result over a specified length (81 bars by default, as per the article).
- Scale the ROC by the RMS, and limit the maximum scaled value to 2.
- Calculate the factor for adjusting the final filter’s period. The value is the square of one minus half of the scaled ROC.
- Multiply the first filter’s period by the factor from step 4, then limit the result to a minimum value of 2, to calculate the adaptive period.
- Calculate a separate SuperSmoother using the adaptive period from step 5. This filter is the Adaptive SuperSmoother.
The resulting filter dynamically reduces its critical period to increase responsiveness when changes in the fixed-period SuperSmoother increase relative to the RMS. This behavior applies reasonable smoothing, while offering significantly reduced lag for aligning with market movements.
█ USAGE
This indicator plots a fixed-period SuperSmoother (red) and the Adaptive SuperSmoother (blue) on the main chart as well as an oscillator showing the relationship between the filters in the separate pane. Ehlers recommends analyzing the difference between these two filters to derive trading signals. The preferred trading direction is long when the Adaptive SuperSmoother is above the fixed-period SuperSmoother, and short otherwise. Ehlers also suggests that peaks and valleys in the difference between the filters can help identify turning points.
This script includes three inputs for customizing the filter calculations:
- Source: The source series to process. The default is “Close”.
- Base period: The base period of the filters. The default is 20.
- RMS length: The number of bars in the RMS calculation. The default is 81.
The snapshot below shows the indicator’s outputs using default settings on a 1D S&P 500 Futures chart. The Adaptive SuperSmoother responds to market movements more quickly than the fixed-period SuperSmoother, while still smoothing out high-frequency noise in the data:
Source link
Author

- Ytv Market News
- Share-market news writer and analyst with deep experience covering equities, commodities, forex, and cryptocurrencies for readers in the USA, UK, Canada, and Australia. Ytv Market News delivers timely market updates, practical trading insights, and clear explanations of macro and company-level catalysts that move prices. Combines on-the-ground financial reporting with technical analysis, using concise charts and actionable ideas to help investors and traders make smarter decisions.
Latest entries
Commodities NewsAugust 24, 2026Equinor and Aker BP Make New North Sea Gas Discovery
Investing InsightsAugust 24, 2026Daesang’s Cash Plunges 90% Ahead of $169 Million Antitrust Fine; $303 Million Drained by Debt Repayment and Investment — BigGo Finance
GermanyAugust 24, 2026British firm offers to restart mothballed Australian manganese smelter
Crypto NewsAugust 24, 2026Debasement trades lift Bitcoin amid long-term holder distributions
