Ehlers Super Smoother Trend Score [BackQuant]Ehlers Super Smoother Trend Score
Overview
Ehlers Super Smoother Trend Score is a regime and trend-strength indicator built on a signal-processing filter created by John F. Ehlers. Instead of smoothing price with a standard moving average (which is mathematically crude and prone to noise and aliasing), this indicator applies the Ehlers Super Smoother, a Butterworth-style low-pass filter designed specifically for market data. The filtered series is then scored for directional persistence across a configurable lookback window, producing an oscillator-like trend score that measures how consistently the smoothed trend is advancing or deteriorating.
This is not a simple “MA slope” tool. It is:
A proper low-pass filter (Super Smoother) to reduce noise while preserving structure.
A persistence score that converts the filtered trend into a quantitative regime signal.
A threshold framework that turns the score into long/short regime transitions with clean state logic.
Where the filter comes from (and why it matters)
John F. Ehlers is known for applying digital signal processing (DSP) techniques to technical analysis. Traditional moving averages are not designed as proper frequency-selective filters. They blur price, lag heavily, and can introduce distortions, especially when the market contains high-frequency components (noise) near the Nyquist limit (the maximum representable frequency in sampled data).
The Super Smoother is derived from a Butterworth low-pass filter design. Butterworth filters are engineered to have a maximally flat passband, meaning they smooth without introducing ripples in the filtered output. In trading terms:
Less “wavy” smoothing artifacts than many MA variants.
Better suppression of high-frequency noise.
Cleaner trend structure for downstream logic.
This script implements Ehlers’ recursive coefficient form, giving you a 2-pole (classic) or 3-pole (heavier) filter.
What “Super Smoother” actually is
The Super Smoother is a recursive IIR filter (Infinite Impulse Response). Unlike an SMA which averages a fixed window of past values, an IIR filter uses feedback from its own prior output values. That matters because it can achieve strong smoothing with less lag for a given “smoothness target.”
Conceptually:
Input: price series.
Output: filtered estimate of the “low-frequency” component (trend structure).
Mechanism: combine current input (or pre-filtered input) with previous filter outputs using coefficients derived from a chosen cutoff period.
The coefficients (c1–c4) are not arbitrary, they are computed from exponential decay and cosine terms based on the cutoff period. This is what makes it a real DSP filter rather than “just another MA.”
2-pole vs 3-pole behavior
2-pole (classic)
A standard Ehlers Super Smoother configuration. It offers a strong improvement over typical MAs in smoothness vs lag balance.
3-pole
Adds an additional feedback term (one more prior filtered state). This increases smoothing and noise rejection, but introduces slightly more lag. The advantage is a cleaner structural line, which often improves regime stability when the market is noisy or mean-reverting.
Anti-aliasing pre-filter step
Before applying the recursive formula, the script averages the current and previous price:
avg = (src + src ) / 2
This is a simple but important pre-filter that reduces high-frequency components that can alias into lower frequencies in sampled data. In practice, it helps stop “one-bar spikes” from contaminating the filter output as much.
Inputs and what they really control
Super Smoother Period (ssPeriod)
This is the cutoff period used in the coefficient derivation. It is not the same as “MA length,” but it behaves similarly in that:
Lower period = faster response, less smoothing, more sensitivity to noise.
Higher period = smoother output, better noise rejection, more lag.
Poles
Selects filter order:
2 poles = balanced default.
3 poles = smoother, more conservative.
Score Lookback Start/End
Defines the persistence scoring window. The script compares the current filtered value to many prior filtered values across that range. A longer range makes the score more “confidence-based” and slower to change, while a shorter range makes it more reactive.
Thresholds (Long/Short)
Turns the score into a regime classification:
Long threshold defines when bullish persistence is strong enough to be considered a trend regime.
Short threshold defines when persistence has deteriorated enough to signal a bearish transition.
How the trend score is computed
After filtering, the indicator computes a directional persistence score on the filtered series (not raw price). That distinction matters because you are scoring structure, not noise.
Mechanically:
For each i in the scoring window:
- If filt_now > filt , add +1
- Else add -1
Sum across the window to produce the score.
Interpretation:
High positive score means the filtered trend is consistently higher than many past points, persistent bullish structure.
Low or negative score means the filtered trend is not advancing, or is consistently below prior points, bearish structure.
Scores near the middle mean the filtered series is oscillating without clear persistence, chop or transition.
This is a persistence metric, not a slope metric. It does not care about one-bar direction, it cares about consistency relative to history.
Signal and state logic (why it stays clean)
The indicator uses state logic to prevent constant flip-flopping:
Long condition: score > long threshold.
Short condition: score crosses below short threshold (uses prevScore and current score).
That short logic is event-based, it triggers only on the breakdown transition, not on every bar below the threshold. Once a regime is set, it remains until a real threshold event forces change.
Signals are plotted only on regime flips:
Long marker when signal becomes +1 and prior was -1.
Short marker when signal becomes -1 and prior was +1.
This is designed for alerts and for clean backtesting interpretation.
Visual layers
The indicator can be used purely as a panel oscillator or as a structure overlay.
Pane
Trend Score line, colored by active regime.
Optional reference lines at long/short thresholds for fast regime reading.
On-chart (optional)
Super Smoother line plotted over price, colored by regime.
Optional candle painting and background shading to reflect active regime.
This lets you treat the filter as a dynamic trend structure line while using the score as the regime classifier.
How to interpret it properly
1) The Super Smoother line
This is the cleaned trend structure estimate:
When price respects the smoother line, trend structure is intact.
When price repeatedly chops through it, structure is weak or range-bound.
2) The score
This is the quantified persistence of that structure:
Rising score implies strengthening trend persistence.
Falling score implies deterioration, transition risk, or mean reversion.
Score compression often shows consolidation before a regime shift.
3) Threshold regimes
Above long threshold: bullish persistence regime, trend-following conditions.
Below short threshold: bearish regime transition, defensive or short-biased conditions.
Between thresholds: neutral/transition zone, where chop and fakeouts are common.
Practical use cases
Trend filter
Only take long setups when score is above the long threshold.
Reduce exposure or avoid trend trades in the neutral band.
Treat a breakdown through the short threshold as regime invalidation.
Trend quality assessment
High score = continuation environment.
Moderate score = trend exists but is fragile.
Low/negative score = distribution, downtrend, or unstable structure.
Trade management
Use the Super Smoother line as a structure reference for trailing risk.
Use score deterioration as an early warning before full regime flips.
Use regime flips as hard exits or bias changes.
Tuning guidelines
If you want fewer signals and cleaner regimes
Increase ssPeriod.
Use 3 poles.
Increase scoreEnd (longer scoring window).
If you want faster reaction
Decrease ssPeriod.
Use 2 poles.
Reduce the scoring window length.
Keep in mind: faster settings increase sensitivity to chop. The filter is good, but no filter removes the reality of mean reversion.
What makes this different from “just a smoothed MA score”
The difference is the filter quality. The Super Smoother is a proper low-pass filter with coefficients derived from DSP principles, designed to suppress high-frequency noise and avoid common smoothing artifacts. Scoring that filtered structure gives you a regime metric that is more stable and more meaningful than scoring raw price or scoring a basic MA that still carries a lot of aliasing and distortion.
Summary
Ehlers Super Smoother Trend Score combines a DSP-derived Butterworth-style Super Smoother filter with a directional persistence scoring model. The filter provides a clean, low-noise trend structure series, and the score quantifies how consistently that structure is advancing or deteriorating across a defined window. Threshold-based regime logic converts the score into clean trend states and alerts, making it a practical tool for trend filtering, regime detection, and structure-aware trade management.
อินดิเคเตอร์ Pine Script®






















