indicator · own pane · open source

Ehlers Decycle Oscillator

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Ehlers Decycle Oscillator — a fixed-coefficient FIR filter that subtracts its own 1-bar-delayed output from price. The result isolates the cycle component while removing the slow trend.

  • Centered around 0; zero-line crosses highlight cycle inflections.
  • Pairs well with ITrend for trend + cycle reads.

Source code

//@version=5
indicator("Ehlers Decycle Oscillator", overlay=false)
src = (high + low) / 2
price = 0.0962 * src + 0.5769 * src[2] - 0.5769 * src[4] - 0.0962 * src[6]
dc = nz(price[1], 0)
decycle = price - dc
hline(0, "Zero", color=color.gray)
p_Decycle = plot(decycle, "Decycle", color=color.teal, linewidth=2)
alertcondition(ta.crossover(decycle, 0), "Above zero", "Decycle crossed above zero")
alertcondition(ta.crossunder(decycle, 0), "Below zero", "Decycle crossed below zero")

Comments

No comments yet.

Sign in to comment.