All indicators

Variable Sine Wave Fit

By LuxAlgoFeb 18, 2026

Static chart image

The Variable Sine Wave Fit takes the sinewave indicator idea to a fully fitted model. Over a rolling window it uses Ordinary Least Squares to fit price with a sine wave whose amplitude can damp, expand, or stay constant, riding on a linear trend component. The curve is drawn solid across history and dashed into the future, wrapped in RMSE bands showing how tightly price follows the model. The fit recalculates on new data and adjusts retrospectively, so read it as regime context rather than fixed signals.

How to Trade the Variable Sine Wave Fit?

  • Price inside the RMSE bands: the modeled cycle remains valid — trade with the oscillation's rhythm.
  • Closes well outside the bands: the model is breaking down, often a regime shift or volatility expansion.
  • Extrema dots on the dashed projection: candidate turning points for timing pullbacks, counter-trend scalps, and exits.
  • Dashboard state: Damped, Expanding, or Constant amplitude paired with Trending or Ranging shows whether cycles are compressing, accelerating, or stable.
  • Best Period: the grid-searched cycle length in bars — a live dominant cycle estimate for aligning swing expectations across timeframes.

A rising RMSE readout is information in itself: price is peeling away from the fitted structure, which often accompanies a transition between ranging and trending conditions.

Variable Sine Wave Fit Settings

  • Window Size (N): bars used for the fit; larger windows capture broader cycles, smaller ones react faster.
  • Auto Period / Fixed Period (P): search for the best cycle length automatically or pin it manually.
  • Min/Max Search Period: boundaries for the automatic search.
  • Forecast Length: bars the dashed projection extends.
  • RMSE Band Multiplier: width of the error envelope.
  • Dashboard visibility, position, and size are adjustable, as are the bullish/bearish and band colors.

Frequently Asked Questions

Does the Variable Sine Wave Fit repaint?

Yes. The model refits as each new bar arrives, so the historical curve can adjust retrospectively. Use it for cycle and regime context, not as a signal generator frozen in place.

How does it differ from classic cycle oscillators?

A tool like Even Better Sinewave distills price into a bounded cyclic oscillator. The Variable Sine Wave Fit instead fits amplitude, frequency, phase, and trend directly onto price, quantifies the fit error, and adds forward projections with a regime dashboard.

Is the indicator free to access?

It is — part of the LuxAlgo Library's free collection — and it can be run in Quant, LuxAlgo's AI, right from this page.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5
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.