# Ehlers Instantaneous Trendline

A Trend concept (Digital filters & smoothers) in the LuxAlgo Library, with 1 indicator implementation.

## What is the Ehlers Instantaneous Trendline?

The Ehlers Instantaneous Trendline is a low-lag smoother introduced by John Ehlers, built on the idea that price can be modeled as trend plus cycle. If the dominant cycle is measured, averaging price over exactly one full cycle period makes the cyclical ups and downs cancel, and what remains is the trend. The original construction therefore measures the dominant cycle with [Hilbert Transform](https://www.luxalgo.com/library/concept/hilbert-transform/) techniques and continuously adapts its averaging window to the measured period; the 'instantaneous' name reflects the aim of near-zero lag, the window tracking the current cycle length rather than a fixed lookback.

Ehlers later published a simplified version that approximates the same behavior with a compact recursive filter governed by a single alpha coefficient, typically plotted with a faster trigger line (a lag-reduced copy of the trendline) whose crossings mark trend changes. Read it like a moving average: slope, and which side of it price holds. The honest caveats: in cyclic, sideways conditions the line flattens through the middle of the range by design, and the adaptivity is only as good as the [dominant cycle measurement](https://www.luxalgo.com/library/concept/dominant-cycle-measurement/) feeding it, which on noisy data is an estimate, not a fact.

The two versions have distinct pedigrees. The full construction appeared in Ehlers' Rocket Science for Traders, where the Hilbert machinery measures the period bar by bar and the average resizes itself accordingly; the simplified recursion, published in his later work, fixes alpha around 0.07 and trades the adaptive machinery for robustness and portability, which is why most platform ports, including the widely used LazyBear version, implement the simplified form. The trigger line in the common presentation is a two-bar forward projection of the trendline itself, twice the current value minus the value two bars back, a cheap lag-reduction trick that leads the parent line just enough to cross usefully.

In the Ehlers toolkit the line's identity is its premise: it treats sideways markets as cycles to be canceled rather than noise to be smoothed, which produces its distinctive flat behavior mid-range, a feature doubling as a range detector. Against a fixed [EMA](https://www.luxalgo.com/library/concept/ema/) it promises comparable smoothness with less lag when the cycle estimate is right, and roughly EMA behavior when it is not. Trigger-crossing systems build directly on the pair, and its flattening makes it a natural input for a [trend regime read](https://www.luxalgo.com/library/concept/trend-regime-label/), the line's own posture reporting whether trend tactics currently have anything to work with.

## How to identify the Instantaneous Trendline

Most charts run the simplified version; its parts are quick to verify.

1. Check the input: a single alpha coefficient, around 0.07 in the published default, rather than a bar-count length.
2. Confirm the recursion: a compact filter blending the last few prices with prior outputs, approximating a one-cycle average of price.
3. Find the trigger: a lag-reduced companion, commonly twice the trendline's current value minus its value two bars back.
4. Read the pair: trendline slope and price's side for bias, trigger crossings for timing events.
5. Use the flat state: the line going horizontal through the middle of a range is the design working, a message to stand trend tactics down rather than a malfunction.

## How traders use it

- As a trend bias line: slope and price's side of the trendline define direction, with less lag than a fixed average of comparable smoothness when the cycle estimate is on target.
- As a signal pair: crossings between the trendline and its trigger line are the classic entry and exit events in Ehlers' own presentation of the tool.
- As a drop-in replacement for a conventional moving average in baseline or crossover roles where lag is the main complaint.
- As a range detector: the line's deliberate flattening in cyclic conditions is itself a read, gating trend systems off exactly where their setups degrade.
- In multi-timeframe stacks: a higher-timeframe instantaneous trendline supplies the governing bias while the trading timeframe uses the trigger pair for execution, the standard division between regime and timing.

## Instantaneous Trendline vs related smoothers

- **EMA** (https://www.luxalgo.com/library/concept/ema/): The EMA smooths over an arbitrary fixed memory; the Instantaneous Trendline aims its averaging at the measured cycle so the oscillation cancels out. When the cycle estimate is good the result is comparable smoothness with visibly less lag; when it is poor, the two lines behave much alike.
- **Ehlers SuperSmoother** (https://www.luxalgo.com/library/concept/ehlers-supersmoother/): Same author, different philosophy: the SuperSmoother is a fixed-cutoff filter that rejects everything faster than a chosen period, while the Instantaneous Trendline adapts to cancel the current dominant cycle specifically. One is a designed filter, the other a model-based average.
- **Adaptive-lookback MA** (https://www.luxalgo.com/library/concept/adaptive-lookback-ma/): The generic adaptive family varies its window by volatility or efficiency; the Instantaneous Trendline varies its effective window by measured cycle period, a narrower and more specific adaptation. Cycle-aware markets reward the specificity; trending, cycle-free ones erase the difference.

## FAQ

### How is the Ehlers Instantaneous Trendline different from a moving average?

A fixed-length moving average smooths over an arbitrary window, so its lag is whatever that window implies. The Instantaneous Trendline instead adapts its smoothing to the measured dominant cycle so that cyclical swings cancel out of the average. When the cycle estimate is good it tracks the trend with noticeably less lag; when the estimate is poor, the advantage largely disappears.

### What is the trigger line on the Instantaneous Trendline?

The trigger is a faster companion line, in the common version the trendline projected forward: twice the current value minus the value from two bars back. Because it leads the smoother trendline, crossings between the two flag turns earlier than waiting for the trendline's own slope to flip. Like any crossover logic, it produces false signals when the market chops sideways.

### What is the difference between the full and simplified versions?

The full version, from Rocket Science for Traders, measures the dominant cycle with Hilbert techniques each bar and resizes its average to match, genuine adaptivity at the cost of the whole measurement pipeline. The simplified version replaces that with a fixed-alpha recursive filter that approximates the behavior, far more robust and portable, which is why nearly all platform implementations use it. The names get used interchangeably; the internals differ meaningfully.

### What alpha value should the simplified version use?

Ehlers' published default sits near 0.07, and most ports ship it. Raising alpha shortens the effective memory, faster tracking and more noise; lowering it smooths and slows. Because alpha stands in for the cycle-adaptive machinery, there is a case for tuning it to the instrument's typical cycle length on your timeframe, though at that point the honest comparison is against a well-chosen conventional average.

### Does the Instantaneous Trendline repaint?

The simplified version does not: it is a causal recursion over confirmed prices, values final once printed, with the usual live-bar updating before the close. The full version is also causal, but its cycle estimate jitters, so its character can shift bar to bar in a way that looks unstable without being retroactive. Neither rewrites history; both, like every smoother, look better in hindsight than they traded live.

### Why does the line go flat in ranges?

By design. The construction treats sideways movement as a cycle and averages over its full period, so the oscillation cancels and the output holds still near the range's center while price swings around it. That flatness is informative twice over: it stops the false slope flips a fixed average would print, and it announces that conditions are cyclic, handing the market to mean-reversion tactics until the line bends again.

## Implementations in the Library

- Ehlers Instantaneous Trendline (LuxAlgo): https://www.luxalgo.com/library/indicator/ehlers-instantaneous-trendline/

## Related concepts

- Gaussian Filter: https://www.luxalgo.com/library/concept/gaussian-filter/
- Butterworth Filter: https://www.luxalgo.com/library/concept/butterworth-filter/
- Chebyshev Filters: https://www.luxalgo.com/library/concept/chebyshev-filters/
- Elliptic Filter: https://www.luxalgo.com/library/concept/elliptic-filter/
- Bessel Filter: https://www.luxalgo.com/library/concept/bessel-filter/
- Ehlers SuperSmoother: https://www.luxalgo.com/library/concept/ehlers-supersmoother/
- Ultimate Smoother: https://www.luxalgo.com/library/concept/ultimate-smoother/
- Swiss Army Knife Filter: https://www.luxalgo.com/library/concept/swiss-army-knife-filter/
- Windowed FIR Smoothing: https://www.luxalgo.com/library/concept/windowed-fir-smoothing/
- Laguerre Filter: https://www.luxalgo.com/library/concept/laguerre-filter/

---

Source: https://www.luxalgo.com/library/concept/ehlers-instantaneous-trendline/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/