An independent plugin for AmiBroker · built for serious traders Documentation & support →

Hilbert Oscillator

A low-lag cycle oscillator based on the Hilbert transform, after John Ehlers.

Hilbert Oscillator

The Hilbert Oscillator is John Ehlers' cycle-based oscillator, from Rocket Science for Traders. The Hilbert transform is a signal-processing tool that recovers the in-phase and quadrature components of a wave — in plain terms, it lets you read exactly where the market currently sits within its cycle. The oscillator turns those components into a smooth curve you can read much like an RSI or a stochastic, but with a crucial difference: because it is matched to the measured dominant cycle rather than a fixed length, it leads those conventional oscillators and stays in step with the market's actual rhythm.

How the Toolbox does it

The indicator produces two curves, a lead line and a lag line, that swing together with the cycle. The crossing of the lead over the lag (and back) marks the turning points of the cycle — a clean, low-lag timing signal in a cyclic market. It is computed on the bar's midpoint, (High + Low) / 2, which is smoother and more symmetric than the close. The Toolbox ships it as a ready-made chart in its own pane.

Swap the DSP engine

The oscillator is matched to the market's dominant cycle, so the estimator that measures that cycle sets its rhythm. Ehlers' original public version read the cycle one way, with the Homodyne Discriminator; the Toolbox lets you choose the engine, so you can trade smoothness against responsiveness without rewriting anything.

The available engines are:

  • Homodyne Discriminator — the low-lag Ehlers default, and what the original public versions used.
  • Ehlers alpha Dominant Cycle — a lighter phase-accumulation read you tune by hand.
  • Autocorrelation periodogram (Mesa) — a full spectral read, steady on real markets; the open basis of Ehlers' MESA approach.
  • Burg maximum-entropy spectrum — the sharpest frequency resolution, best at separating closely spaced cycles.
  • Kalman cycle tracker — the lowest lag and the quickest to react when the cycle length changes.
  • Concentrated-taper periodogram (Multitaper) — the steadiest reading in noisy data.

The newer spectral and tracking engines are more powerful than the Homodyne Discriminator the public version used — more accurate or faster to adapt — and the choice is a single setting, the formula otherwise unchanged.

How you would use it

Treat lead-over-lag crossings as the cycle turning up, and lag-over-lead as it turning down. Because the oscillator only makes sense when there is a real cycle to read, it pairs well with the Toolbox's signal-to-noise gauge: only act on its turns when the cycle is clean enough to be worth trading.