# Decycler

Also known as: decycler oscillator.
A Statistics concept (Ehlers DSP cluster) in the LuxAlgo Library, with 1 indicator implementation.

## What is a Decycler?

The decycler is a smoothing filter introduced by John Ehlers in Cycle Analytics for Traders (2013). The idea is subtraction rather than averaging: run a high-pass filter to isolate the short-period cycle content of price, then subtract that output from price itself. What remains is everything slower than the chosen cutoff, the trend and long swings, with the cycle chatter removed. Because the subtraction is exact, the decycler tends to hug price more closely than a moving average of comparable smoothness.

Traders care because conventional smoothing buys noise reduction with lag. A long [EMA](https://www.luxalgo.com/library/concept/ema/) is smooth but arrives late; a short one is timely but jittery. The decycler attacks the problem from the frequency side: instead of averaging everything, it removes only the components shorter than the cutoff period, so the slow components pass through with very little delay. In trending markets the result is a smooth line that often turns close to where price actually turns.

A companion construction, the decycler oscillator, takes the difference between two decyclers (or high-pass filters) with different cutoffs and plots it as an oscillator around zero. Crossings and slope changes of that difference are used as trend-change signals. Both tools sit in the Ehlers DSP toolbox alongside the [Ehlers SuperSmoother](https://www.luxalgo.com/library/concept/ehlers-supersmoother/) and the [roofing filter](https://www.luxalgo.com/library/concept/roofing-filter/), which approach the same noise problem from complementary directions.

## How it's calculated

Ehlers defines the simple decycler as price minus a high-pass filter of price. Algebraically this reduces to a one-pole smoothing recursion:

```
alpha = (cos(360 / cutoff) + sin(360 / cutoff) - 1) / cos(360 / cutoff)
Decycler = (alpha / 2) * (price + price_prev) + (1 - alpha) * Decycler_prev

  cutoff: high-pass cutoff period in bars (commonly 60 or higher; angles in degrees)
  price: input series, typically close
  Decycler_prev: prior bar's decycler value
```

The decycler oscillator variant plots the difference between two decyclers or high-pass filters with different cutoffs, often expressed as a percentage of price.

Some published versions use a second-order high-pass filter; the shape is similar but the exact coefficients differ.

## How traders use it

- As a trend baseline: price holding above a rising decycler is treated as an uptrend, below a falling one as a downtrend, with the line acting as dynamic support or resistance in the same way traders use a long moving average but with less lag.
- Decycler oscillator crossings of zero, or of a signal band, are used as trend-change triggers; some implementations pair a fast and a slow version and act on their agreement.
- As a pre-filter: removing cycle content before feeding price into other studies can reduce whipsaw in downstream signals, similar in spirit to how the [roofing filter](https://www.luxalgo.com/library/concept/roofing-filter/) conditions data for oscillators, but keeping the low frequencies instead.
- Its limitation is the mirror of its strength: because it deliberately discards cycle-period swings, it is a poor tool for timing entries inside a trading range, and the cutoff period still has to be chosen, often guided by [dominant cycle measurement](https://www.luxalgo.com/library/concept/dominant-cycle-measurement/).

## Decycler vs related concepts

- **Ehlers SuperSmoother** (https://www.luxalgo.com/library/concept/ehlers-supersmoother/): The SuperSmoother is a low-pass filter that attenuates high frequencies directly; the decycler reaches a similar goal by subtracting a high-pass output from price, which tends to preserve the trend component with even less lag at long cutoffs.
- **Roofing Filter** (https://www.luxalgo.com/library/concept/roofing-filter/): The roofing filter keeps the middle band of frequencies for cycle trading and discards the trend; the decycler does the opposite, keeping the trend and discarding the cycles.
- **EMA** (https://www.luxalgo.com/library/concept/ema/): An EMA smooths by weighting all past prices, which delays every component; the decycler removes only the fast components, so slow moves come through with noticeably less delay than an EMA of similar smoothness.

## FAQ

### What cutoff period should I use for the decycler?

Ehlers' examples often use long cutoffs such as 60 bars or more, since the goal is to keep only the trend. Shorter cutoffs let more swing content through and make the line livelier but noisier.

### Is the decycler the same as the decycler oscillator?

No. The decycler is a smooth trend line plotted on price; the decycler oscillator is the difference between two differently tuned versions, plotted around zero as a trend-change indicator.

### Does the decycler repaint?

No. It is a causal recursive filter that uses only current and past prices, so completed values do not change, though like any filter its most recent values respond as new bars arrive.

### Does low lag mean the decycler predicts turns?

No. It reduces the delay in seeing a turn that has already begun; it does not anticipate one. In flat, choppy markets its slope can still flip back and forth.

## Implementations in the Library

- Decycler (LuxAlgo): https://www.luxalgo.com/library/indicator/decycler/

## Related concepts

- Dominant Cycle Measurement: https://www.luxalgo.com/library/concept/dominant-cycle-measurement/
- Sinewave Indicator: https://www.luxalgo.com/library/concept/sinewave-indicator/
- Roofing Filter: https://www.luxalgo.com/library/concept/roofing-filter/
- Even-better Sinewave: https://www.luxalgo.com/library/concept/even-better-sinewave/
- Adaptive-parameter Technique: https://www.luxalgo.com/library/concept/adaptive-parameter-technique/
- Autocorrelation Periodogram: https://www.luxalgo.com/library/concept/autocorrelation-periodogram/

---

Source: https://www.luxalgo.com/library/concept/decycler/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/