Hilbert Dominant Cycle Pass Node

Hilbert Transform Dominant Cycle — Series Input

AdvancedCyclePass

Overview

The Hilbert Dominant Cycle Pass Node applies John Ehlers' Hilbert Transform to a series input to measure the instantaneous dominant cycle period. It estimates the periodicity of the dominant frequency component present in the data at each bar.

The dominant cycle length output can be used to adaptively set indicator periods — e.g., automatically adjusting an RSI or moving average period to match the current market cycle. As a Pass node, it works on any numeric series, allowing cycle analysis on price, volume, or any derived indicator stream.

Algorithm

1. Apply Hilbert Transform quadrature filter to extract in-phase (I) and quadrature (Q) components
2. Compute instantaneous period = 2π / arctan(Q/I)
3. Smooth period with alpha-weighted EMA: dominantCycle = α × period + (1−α) × prevCycle
4. Clamp output to [6, 50] to prevent extreme values
Output: cycle period in bars (typically 6–50). Recursive from bar 0; no fixed warm-up.
Higher alpha = faster cycle tracking; lower alpha = more stable but lagging cycle estimate.

Parameters

ParameterDefaultDescription
alpha0.2Smoothing factor for the dominant cycle EMA (0 = no update, 1 = no smoothing)

Inputs & Outputs

SlotDirectionTypeDescription
inputInput{ values, timestamps }Any numeric series for cycle analysis
valuesOutput(number | null)[]Dominant cycle period in bars (range 6–50)
timestampsOutputnumber[]Unix timestamps aligned to input

Use Cases

Adaptive Indicator Periods

Feed the dominant cycle output as the period parameter into other indicators (RSI Pass, moving averages) to create fully adaptive indicators whose lookback period automatically adjusts to the current market cycle length.

Cycle Phase Trading

When the dominant cycle is short (6–12 bars), the market is in a fast, choppy cycle — favor shorter-term mean-reversion strategies. When the cycle is long (30–50 bars), use longer-period trend-following approaches.

Trend vs. Cycle Mode Detection

In a trending market, the Hilbert Transform loses its cycle coherence — output becomes noisy and unstable. Detecting when cycle output becomes erratic (high bar-to-bar variation) is itself a signal that the market has entered a trending rather than cycling phase.

Tips & Best Practices

Output Is a Period, Not a Price

The output values represent the number of bars in the dominant cycle — not a price or oscillator value. A value of 20 means the dominant market cycle at that point spans approximately 20 bars. Use this as an integer period input for other nodes.

Best on De-Trended Data

The Hilbert Transform works best on detrended or oscillating data. Apply it after a Detrended Price Oscillator or Band-Pass Filter for cleaner cycle estimates. Applied directly to trending price, the output may be noisy and unreliable.

Smooth Before Using as Period

The raw dominant cycle output can be noisy, causing downstream indicators to jump between very different periods on consecutive bars. Always round to the nearest integer and apply a 3-bar median or SMA before using as an adaptive period.

Related Indicators