Skip to content
All library documents

Ehlers Instantaneous Trendline with a Zero-Lag Average

Article ProRealCode

Summary

The document presents an implementation of John Ehlers’ Instantaneous Trendline, alongside a zero-lag exponential moving average. It estimates cycle phase from price-derived in-phase and quadrature components, adjusts phase changes for wraparound and extreme values, and accumulates those changes to estimate an instantaneous cycle period. A smoothed period then determines the lookback used to average price into the trendline. The zero-lag series is calculated separately, and both outputs are initialized to price during the early bars.

An alternative method for calculating the Hilbert Transform components is also described, drawn from a later Ehlers formula. The document includes indicator code and refers to a screenshot comparing the original and alternative calculations, but supplies no quantitative performance evaluation or trading rules. These are adaptive signal calculations rather than a complete strategy; the material does not establish how to enter or exit trades, or whether the line improves results across markets. The method’s usefulness therefore depends on implementation choices and empirical testing.

Key ideas

  • The indicator estimates a changing dominant cycle period from price-derived phase changes.
  • The estimated period sets the averaging window for the instantaneous trendline.
  • A separate smoothed zero-lag average is returned alongside the trendline.
  • The document offers an alternative Hilbert Transform calculation for the phase components.
  • It provides implementation detail but no trading rules or performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.