Skip to content

Hilbert Transform - Trend vs. Cycle Mode (HT_TRENDMODE)

Ehlers DSP cycle trend hilbert regime-detection dsp

A binary indicator that determines if the market is currently in a trending state (1) or a cyclical state (0).

Usage

Use as a master filter for strategy selection. Deploy trend-following tools when TRENDMODE is 1, and mean-reversion tools when TRENDMODE is 0.

Background

Determining the current market regime is the 'holy grail' of technical analysis. The HT_TRENDMODE indicator uses the rate of change of the dominant cycle phase to distinguish between trending and ranging price action, allowing traders to avoid 'whipsaws' in non-conducive environments. — Rocket Science for Traders

Formula

\[ \text{TRENDMODE} = \begin{cases} 1 & \text{if trend detected} \\ 0 & \text{if cycle detected} \end{cases} \]

Source