Ehlers Adaptive Trend Filter + Consensus Engine v13Ehlers Adaptive Trend Filter + Consensus Engine
From TrendMatrix Labs: Our core mission is to bridge the gap between advanced quantitative methods and intuitive, actionable visual trading. We built this engine because standard retail moving averages lag too heavily and fall apart during choppy, bracketed markets. We wanted an institutional-grade toolkit that leverages true Digital Signal Processing (DSP) to eliminate lag, paired with a robust matrix-style screener so you can manage an entire watchlist from a single chart. v13 substantially upgrades the universe management layer with an eight-watchlist architecture — four pre-curated thematic universes plus four matching customizable slots — per-slot mode toggles that let you save custom edits without losing them, and automatic deduplication so the 40-ticker request.security() budget is never wasted on duplicate symbols.
The Ehlers Adaptive Trend Filter + Consensus Engine combines advanced digital signal processing techniques developed by John Ehlers with a multi-symbol consensus screening framework. It is designed to identify true trend strength, catch emerging opportunities, and flag deteriorating market conditions across an entire watchlist simultaneously.
Unlike traditional moving averages, this indicator uses low-lag Ehlers filters and adaptive cycle analysis to separate meaningful trend signals from market noise while maintaining absolute responsiveness during rapid regime shifts.
Key Features
1. Curated Multi-Universe System (NEW in v13)
The architecture ships eight independent watchlists in a single script: four pre-curated thematic universes with 36 institutional-quality tickers each, plus four matching custom slots that hold up to 36 of your own tactical names. A single dropdown selects which universe is actively screened; only the selected one consumes request.security() budget, leaving the other seven dormant in script state.
NASDAQ / AI Infrastructure — 36 tickers spanning the full AI buildout stack: compute silicon (NVDA, AVGO, AMD, ARM, MU), semiconductor equipment and foundry (TSM, LRCX, AMAT, KLAC, ASML), networking and systems (ANET, SMCI, DELL, HPE), hyperscalers (MSFT, GOOGL, META, AMZN, ORCL), electrical infrastructure (VRT, ETN, PWR, HUBB), cooling (JCI, TT), power generation and fuel (GEV, CEG, VST, CCJ), and data center REITs (EQIX, DLR), plus QQQ / SMH / SPY benchmarks.
Gold Miners — 36 tickers covering Tier-1 majors (NEM, GOLD, AEM, AU, GFI, KGC, NST, EVN), mid-tier producers, Australian-listed mid-caps, silver pure-plays, capital-light royalty / streamers (FNV, WPM, RGLD, OR), plus GDX / GDXJ / SIL / SILJ ETFs capturing different beta profiles to the same underlying.
Bioscience — 36 tickers across Big Pharma (LLY, PFE, JNJ, MRK, ABBV, BMY, AZN, NVO, NVS, GSK), established large biotech (AMGN, GILD, VRTX, REGN, BIIB, ILMN), innovative platform companies (MRNA, ALNY, ARGX, BNTX, RPRX), mid-cap biotech with commercial revenue, and gene editing leaders (CRSP, NTLA, BEAM), plus IBB / XBI / ARKG benchmarks.
Energy — 36 tickers spanning integrated majors (XOM, CVX, COP, OXY, EQNR), US and Canadian E&P, refiners, oilfield services, midstream pipelines, and natural gas / LNG specialists, plus five sector ETFs (XLE, OIH, XOP, USO, UNG) for broad and sub-sector framing.
Three modes per universe slot: Every slot has a Mode selector with three independently-saving options:
Default — uses the hardcoded preset only; your custom edits stay saved but inactive
Custom — uses only what you type into the custom text-area; preset ignored
Merge — concatenates both, with automatic deduplication at parse time
This means you can save tactical names into a custom slot indefinitely without losing them when you switch back to the curated baseline. Flip the toggle, not delete content.
Auto-include chart symbol: A separate toggle prepends the chart's current symbol to whichever universe is active, so the ticker you're viewing always appears in the rankings regardless of which preset is loaded. Dedup prevents double-billing when the chart symbol overlaps with the preset.
2. Adaptive Trend Detection
Choose from multiple Ehlers-based filtering methods to match your specific trading horizon:
2-Pole + 2-Pole (Fast): Maximum responsiveness for active swing traders.
3-Pole + 2-Pole (Hybrid): Balanced trend detection and noise reduction.
3-Pole + 3-Pole (Smooth): Heavy trend filtering designed to eliminate whipsaws.
MAMA/FAMA (Adaptive): Market-cycle adaptive filtering using a faithful execution of Ehlers' famous MESA (Maximum Entropy Spectral Analysis) methodology.
💡 Engine Tip: We built an auto-calibration mode directly into the script. When you swap timeframes (e.g., from a Daily chart down to a 1-Hour chart), the lookbacks, dynamic detox periods, and volatility safety margins automatically scale themselves so you never have to constantly fiddle with the input settings.
3. Dynamic Support Baseline
A secondary adaptive baseline acts as a strict structural trend qualification filter.
When the signal path remains above the baseline, the asset is locked in a healthy trend.
When the signal path falls below the baseline, the trend structure is considered compromised.
The visual trend zone between the signal path and the baseline provides an instant, intuitive look at trend maturity and safety margins.
4. Volatility-Adaptive Analysis
Traditional fixed thresholds fail when applied across different asset classes or volatile market regimes. This script automatically scales its internal calculations using a rolling historical volatility percentile, providing highly accurate, normalized readings for Price Deviation, Trend Extension, Safety Margins, and Technical Quality.
5. Advanced Reversal & Momentum Engine
The reversal section completely bypasses simple slope checks, utilizing a multi-dimensional conviction score (0–100) based on:
Epistemic Disagreement: Catching early cycle shifts when the ultra-responsive Adaptive filter diverges from the slower core structural lines.
2nd Derivative Acceleration: Measuring the actual rate of change of the filter separation (the acceleration of the trend).
Volatility Compression: Evaluating structural spreads against a rolling 100-bar 20th percentile to catch explosive expansions breaking out of tight consolidations.
Optional background highlights cleanly map out precise bullish and bearish divergence zones where structural trend and velocity disagree.
The Consensus Engine Screener
The built-in dashboard simultaneously evaluates every symbol in your active universe across three completely independent trend frequencies: FAST (2P+2P), CORE (3P+2P), and ADAPTIVE (MAMA/FAMA).
Assets are assigned a clear structural tier based on exactly how many independent filters agree:
Elite (3/3 Bullish): All filters are perfectly aligned. This indicates the strongest trend environment and the highest-conviction buying opportunities.
Confirmed (2/3 Bullish): The macro trend remains healthy, but a single higher-frequency filter has begun to pull back. Excellent for monitoring trend maturity.
Emerging (1/3 Bullish): Early-stage developments where the zero-phase adaptive model detects improving conditions before the broader trend confirms. This is your primary hunter tool for spotting fresh reversals.
Bear (0/3 Bullish): Complete bearish alignment. Crucial for portfolio risk management, short-side tracking, and identifying weak market segments.
Institutional Ranking & Interpretive Aids
Instead of just telling you an asset is up, the ranking engine scores your watchlist using a Calmar-adjusted weighted separation model that blends filter distance, consensus agreement, localized volatility, and multi-period returns. You can fully customize the weights of the filters to natively match your trading style.
To completely eliminate cognitive load when monitoring up to 40 tickers, the optional Interpretation Engine automatically synthesizes these underlying metrics into clear, contextual action tags displayed right on your dashboard:
ENTRY · ADD · HOLD · CAUTION · TRIM · WATCH · AVOID
This is highly practical for identifying a "Bleeding Elite" asset — a stock that technically still ranks in the top tier but is flagged with a TRIM · Mature+fading tag because its internal momentum and filter separation are decaying.
v13 Release Notes
Eight-watchlist universe architecture — four pre-curated thematic universes (NASDAQ / AI Infrastructure, Gold Miners, Bioscience, Energy) with 36 institutional-quality tickers each, plus four matching custom slots that hold up to 36 of your own tactical names.
Per-slot Mode toggle (Default / Custom / Merge) preserves custom edits in input state without forcing deletion when switching back to the curated baseline.
Chart-symbol auto-include toggle so the active chart symbol always appears in the rankings regardless of which preset is loaded.
Automatic ticker deduplication at parse time — no duplicate symbols ever waste the 40-call request.security() budget across Merge mode, chart-symbol prepend, or pasted-in custom slots
Universe selector and slot reordering with NASDAQ first as the default active universe.
Comprehensive tooltips on every input explaining purpose, defaults, and tradeoffs.
Ideal For:
Trend-Following & Swing Traders: Looking for clean entries with minimized lag.
Portfolio Managers: Needing to instantly separate leading assets from laggards across custom matrix watchlists.
Market Breadth Analysts: Looking to see exactly how many stocks in a sector are healthy versus how many are internally fracturing.
Top-Down Visual Execution: Use the screener on a macro timeframe (like Daily) to find your clean setups, then drop timeframes (like the 15-Min or 1-Hour) and use the real-time DSP directional arrows to perfectly time your mean-reversion expansions.
Penunjuk Pine Script®






















