Skip to content
All library documents

Building a Three-Harmonic Fourier Wave Indicator

Article ProRealCode

Summary

The document presents a translated Ehlers-style indicator that estimates a composite cyclical wave from closing prices. It first differences price with a two-bar lag, then applies band-pass filters at a base period and its second and third harmonics. Each filtered series is paired with a quadrature estimate based on its change, and rolling sums of squared filter and quadrature values are used to scale the higher-harmonic contributions before combining them into one output.

The implementation initializes the filters to zero during the initial period and gives a sample period of 20 with bandwidth 0.1. The accompanying guidance says to choose a period that is a multiple of a measured historical cycle and cautions against changing bandwidth too much. The document supplies code but no market examples, performance tests, or evidence that the wave predicts prices. Its usefulness therefore depends on correct implementation and on cycles remaining relevant; the provided description does not explain cycle measurement, trading rules, or how to handle unstable scaling terms.

Key ideas

  • The indicator uses a lagged price difference as its input to three band-pass filters.
  • The filters target a base cycle and its second and third harmonics.
  • Quadrature estimates and rolling energy sums scale the harmonic components into a composite wave.
  • The suggested period should align with a multiple of a historically measured cycle.
  • No performance evidence or trading rules are supplied.

Tags

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