All indicators

Firefly Oscillator

By LuxAlgoJun 8, 2026

Static chart image

Firefly Oscillator renders the community-bred momentum gauge in fully specified form, a first faithful implementation of the Firefly oscillator recipe. A weighted price that double-counts the close is converted to a z-score against its own EMA basis and standard deviation, double-smoothed with a zero-lag pass, and rescaled so 50 is neutral on a roughly 0-100 scale. The line is bullish-colored above the midline and bearish below, a gradient fill anchors it to 50, and the optional glow flares as readings stretch, the flaring the oscillator is named for.

How to Trade the Firefly Oscillator?

  • Midline crosses: a cross of 50 flips the volatility-adjusted stretch from one side of the basis to the other; both directions carry alerts.
  • Overbought and oversold: pushes beyond the dashed 80 and 20 levels mark statistically stretched readings, and the fades back through them carry their own alerts.
  • Divergences: with detection on, price printing a fresh extreme while the oscillator prints a lesser one draws a line between the two swings, tagged Bullish or Bearish.

Because the z-score underneath is unbounded, violent bars can push readings slightly past 0 or 100: stretch, not error.

Firefly Oscillator Settings

  • Basis Length (default 10): lookback shared by the EMA basis and the deviation of the weighted price; shorter reads twitchier.
  • Smoothing Length (default 3): EMA length of the zero-lag double smoothing pass.
  • Overbought (default 80) and Oversold (default 20): the stretched-reading levels.
  • Show Divergences (default off) with Pivot Lookback (default 5) and Max Pivot Distance (default 60): swing confirmation and the widest allowed gap between swings.
  • Glow Effect (default on): the halo that intensifies toward the extremes.

Frequently Asked Questions

Original indicatorBuilt in-house by LuxAlgo

The Library is free. Quant makes it yours.

Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.