Hilbert Transform - Trend vs Cycle Mode
Overview
The Hilbert Transform - Trend vs Cycle Mode indicator provides a binary classification of market behavior: trending (1) or cycling (0). This indicator analyzes the rate of change in the dominant cycle phase to determine if the market is exhibiting directional trending behavior or oscillating in a sideways cycle pattern. This critical distinction is essential because different trading strategies work best in different market conditions.
The indicator works by examining how consistently the phase advances. In a trending market, the phase advances irregularly or may even stall, as the trend component dominates over cycles. In a cycling market, the phase advances steadily and predictably. By quantifying this behavior, the indicator provides an objective measure that helps traders avoid the common mistake of using oscillators in trends or trend-following methods in ranges.
Interpretation & Trading Signals
Binary Output Values:
- 1 (Trending Mode): Market is in a directional trend - use trend-following strategies
- 0 (Cycling Mode): Market is ranging/consolidating - use mean-reversion strategies
- Mode Switch (0→1): New trend starting, exit range trades, start trend following
- Mode Switch (1→0): Trend ending, exit trend trades, prepare for range trading
Strategy Selection:
- Cycling Mode (0): Use RSI, Stochastic for overbought/oversold levels
- Trending Mode (1): Follow direction, avoid countertrend oscillator signals
- With SineWave: When lines cross + mode switches to 1 = strong trend signal
- Mode Persistence: Modes typically last multiple bars, avoid overtrading
Common Pitfalls to Avoid:
- Wrong Strategy: Using oscillators in trends leads to "tremendous errors"
- Late Recognition: Markets spend most time consolidating - detect early
- Ignoring Mode: Same strategy doesn't work in both market conditions
- Over-reliance: Use with other indicators for confirmation
Example Usage
Code examples will be available once the Rust implementation is complete.