Variable Sine Wave Fit
By LuxAlgoFeb 18, 2026
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
Free indicator
Get free access to this indicator on the platforms below.
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.

