OPEN-SOURCE SCRIPT

Quantum Momentum Wave [Pineify]

949
Quantum Momentum Wave [Pineify]

Quantum Momentum Wave is a signed peak-momentum oscillator paired with a Kaufman-style adaptive filter. Instead of measuring the net change from one point to another, the wave scans the full lookback window and returns the largest absolute price displacement with its original sign. The wave is linearly smoothed and then tracked by an adaptive signal line, so entry markers fire on context-filtered reversals rather than every momentum flip.

Key Features

  • Signed peak-momentum engine that isolates the strongest move inside the lookback
  • Linear regression smoothing to tame the step-change behavior of raw peak readings
  • Adaptive signal line that speeds up when the wave is stretched and slows down in noise
  • Zone-filtered BUY and SELL markers that only fire when the wave is past zero in the opposite direction
  • Gradient fill between the wave and zero — bullish above, bearish below
  • Alerts for reversal setups and for zero-line regime shifts


How It Works

The core function is a QMW scan. On each bar it walks the last Momentum Lookback bars, computes price minus each historical bar, and keeps the comparison that produced the largest absolute change. It returns that value with its original sign. So a -6 reading means the single strongest move inside the window was a 6-unit drop, even if the bar-to-bar change right now is small.

Raw peak readings step when a new candle takes over as the dominant move, so the output is passed through linear regression over the Signal Smoothing length. LR fits a straight line through the recent raw values and returns its endpoint, preserving signed direction while cutting short-term jitter.

The adaptive signal runs a Kaufman-style update on top of the smoothed wave. Its coefficient is the ratio of the wave's absolute value to the sum of its recent absolute one-bar changes. When momentum is clearly extended and directional, the ratio is high and the signal follows quickly. When the wave oscillates near zero, the ratio collapses and the line nearly freezes.

How the Components Work Together

Three layers combine into one output. The peak scan answers how hard has price moved inside the window, not just where it ended. Linear regression answers what is the underlying direction of the peak reading after filtering out one-bar swaps between competing peak bars. The adaptive signal answers when has that direction actually shifted by providing a responsive reference line.

Entries layer a location filter on top. A crossover only qualifies when the wave is on the opposite side of zero — buys look for the wave turning up while stretched below zero, sells for the wave rolling over while stretched above it. Crosses near the midline are ignored because they tend to be low-conviction flips without prior displacement, so the setup is biased toward reversals from extended states rather than trend-chasing entries.

Trading Ideas and Insights

  • BUY triangles below zero can flag exhaustion of a downside push and a possible rotation back toward the mean
  • SELL triangles above zero can flag fading upside strength after an extended rally
  • Zero-line crosses act as broader regime markers; alerts on those can frame intraday bias
  • During strong trends the wave may stay on one side of zero for many bars. Counter-trend BUY or SELL labels in that state often need extra confirmation from price structure or higher-timeframe context


Signals are context aids, not standalone trade instructions. Past reactions at these conditions do not guarantee future ones.

Unique Aspects

  • The momentum calculation returns the peak signed displacement within the lookback, not a simple close-minus-close value. The reading stays elevated while the dominant move is still inside the window, which tracks the strongest displacement in memory rather than just endpoint delta
  • The adaptive signal uses a non-standard variation of Kaufman's efficiency ratio — absolute wave value divided by total absolute wave travel — tuned for oscillator input rather than raw price
  • Entry markers require both a crossover and a zone match. No label prints for a crossover that happens in the neutral zone around zero, which filters out the weakest setups


How to Use

  1. Add the indicator to the chart and start with the defaults. The thicker line is the Quantum Wave; the fainter line is the Adaptive Signal
  2. Read the wave color and the gradient fill to see which side of zero the wave is on and how stretched it is
  3. Watch for BUY triangles when the wave is clearly below zero and turning up through the signal line
  4. Watch for SELL triangles when the wave is clearly above zero and turning down through the signal line
  5. Configure alerts for buy, sell, or zero-cross conditions if you want notifications outside the chart


Customization

  • Source Data (default: close) — Price series used for the peak momentum scan
  • Momentum Lookback (default: 14) — Window size for the peak displacement scan. Higher values capture broader swings; lower values react faster
  • Signal Smoothing (default: 9) — Linear regression length applied to the raw wave. Higher values produce a cleaner line with more lag
  • Bullish Color / Bearish Color — Wave color in positive and negative territory, and the BUY/SELL marker colors
  • Adaptive Signal Color — Color of the adaptive reference line; a subtle contrast against the wave usually reads cleanest


Limitations

  • Linear regression smoothing introduces a small amount of lag. On fast reversals the wave can reach the crossover a few bars after price has already moved
  • Because the adaptive ratio uses the wave's own value, very small wave readings near zero make the signal line nearly freeze. This is deliberate but means the reference reacts slowly while momentum is mild
  • Mean-reversion style BUY and SELL labels can occur repeatedly during strong trends. Pair them with price structure or higher-timeframe bias instead of using them in isolation


Conclusion

Quantum Momentum Wave is for traders who want an oscillator that reflects the strongest recent move rather than the endpoint delta. Its value comes from the combination of peak-momentum measurement, linear regression smoothing, and an adaptive reference line that only produces labels when the wave is both stretched past zero and visibly turning back.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.