indicator · own pane · open source

Ehlers Cyber Cycle

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

About

Ehlers Cyber Cycle — extracts the dominant market cycle with a two-pole high-pass and autoregressive smoothing. Crosses of the trigger line signal phase shifts within the cycle.

  • Tune alpha smaller (0.07) for longer cycles, larger (0.3) for shorter ones.
  • Pairs well with the Hilbert Trendline for cycle-aware entries.

Source code

//@version=5
indicator("Ehlers Cyber Cycle", overlay=false)
alpha = input.float(0.07, "Alpha", minval=0.01, maxval=0.5, step=0.01)
src = (high + low) / 2
smooth = (src + 2 * src[1] + 2 * src[2] + src[3]) / 6
var float cycle = 0.0
cycle := (1 - 0.5 * alpha) * (1 - 0.5 * alpha) * (smooth - 2 * smooth[1] + smooth[2]) + 2 * (1 - alpha) * nz(cycle[1], 0) - (1 - alpha) * (1 - alpha) * nz(cycle[2], 0)
trigger = nz(cycle[1], 0)
hline(0, "Zero", color=color.gray)
p_Cycle = plot(cycle, "Cycle", color=color.blue, linewidth=2)
p_Trigger = plot(trigger, "Trigger", color=color.red)
alertcondition(ta.crossover(cycle, trigger), "Cycle up", "Cyber cycle crossed above trigger")
alertcondition(ta.crossunder(cycle, trigger), "Cycle down", "Cyber cycle crossed below trigger")

Comments

No comments yet.

Sign in to comment.