Ehlers Distance Coefficient Filter (EDCF)

Parameters: period = 20 (10–50) smoothing = 5 (2–10)

Overview

The Ehlers Distance Coefficient Filter (EDCF) is one of John Ehlers' lesser-known but highly effective nonlinear filters, introduced in his book "Rocket Science for Traders" (2001). This adaptive filter uses the concept of statistical distance to measure how current prices differ from prior prices over a specified period, creating a coefficient that can produce a moving average-like value with significantly less lag during sharp transitions. The EDCF excels at dealing with market dynamics by behaving more like a trailing stop system during trends while responding quickly to pullbacks and reversals.

The filter works by calculating the distance between current price and multiple previous prices, then using this distance coefficient to weight the filter's responsiveness. When prices move consistently in one direction (trending), the distance coefficient increases, making the filter more responsive. During sideways markets or consolidations, the coefficient decreases, providing more smoothing. This adaptive behavior allows EDCF to maintain smooth output during stable conditions while quickly adapting to genuine market changes, making it particularly useful for trend following with reduced whipsaw risk.

Interpretation & Trading Signals

Primary Applications:

  • Trend Identification: EDCF serves as a trend indicator similar to moving averages
  • Support/Resistance: Acts as dynamic support in uptrends, resistance in downtrends
  • Trailing Stop: Behaves like an adaptive trailing stop during strong trends
  • Pullback Management: Quickly adjusts to pullbacks without sacrificing trend following

Trading Strategies:

  • Trend Following: Enter long when price crosses above EDCF, short when below
  • Conjunction Analysis: Combine with other Ehlers indicators for confirmation
  • Multi-Timeframe: Use different EDCF periods for entry and exit timing
  • No Signals Mode: Often used as a reference line rather than signal generator

Key Characteristics:

  • Less Lag: Reduced lag compared to simple moving averages during transitions
  • Nonlinear Response: Adapts behavior based on market conditions
  • Complex Calculation: Subtracts multiple previous prices from current price
  • General Filter: Can be used with any coefficient statistic

Example Usage

Code examples will be available once the Rust implementation is complete.

Performance Analysis

Related Indicators