Spectra Inflection [JOAT]Spectra Inflection
Introduction
Spectra Inflection is an advanced open-source momentum oscillator that replaces conventional RSI with a Laguerre-domain filter, applies Jurik Moving Average (JMA) adaptive smoothing, and overlays a Zero-Lag EMA (ZEMA) signal line to produce a momentum reading with substantially less lag and noise than standard oscillators. The indicator then layers on Schmitt trigger state transitions, dynamic VWMA bands, gradient histogram rendering, momentum divergence detection, velocity and acceleration tracking, squeeze detection, exhaustion signals, and a comprehensive 16-row dashboard — all in a single pane.
This indicator exists because traditional momentum oscillators like RSI suffer from two fundamental problems: lag and noise. Lag causes late entries and exits. Noise causes false signals in choppy markets. Spectra Inflection addresses both by combining a Laguerre filter (which compresses price history into a shorter effective window without losing smoothness) with JMA adaptive smoothing (which tracks fast moves closely while filtering out chop). The result is a momentum curve that responds to genuine trend shifts quickly while remaining stable during consolidation.
Core Concepts
1. Laguerre RSI Core
The Laguerre filter is a four-element recursive filter originally developed by John Ehlers. Unlike a standard RSI that uses a fixed lookback window, the Laguerre filter uses a damping factor (alpha) to create an exponentially-weighted cascade of four internal registers (L0 through L3). This produces a smoother, more responsive oscillator:
float gamma = 1.0 - alpha
L0 := alpha * close + gamma * nz(L0 )
L1 := -gamma * L0 + nz(L0 ) + gamma * nz(L1 )
L2 := -gamma * L1 + nz(L1 ) + gamma * nz(L2 )
L3 := -gamma * L2 + nz(L2 ) + gamma * nz(L3 )
The cumulative up/down movements across all four registers are then computed to derive an RSI-like value scaled 0-100. Lower alpha values produce smoother output (more filtering), while higher values produce faster response. The default alpha of 0.07 provides a balance between responsiveness and noise rejection.
2. JMA Adaptive Smoothing
The raw Laguerre RSI output is then passed through a Jurik Moving Average, which is a proprietary-class adaptive filter. JMA uses a volatility-tracking mechanism to adjust its smoothing dynamically: when the input is volatile, JMA tracks more closely; when the input is stable, JMA smooths more aggressively. This means the momentum line hugs genuine reversals tightly while filtering out noise during consolidation. The JMA implementation uses three parameters: period (smoothing length), phase (lead/lag adjustment), and power (responsiveness curve).
3. ZEMA Signal Line
A Zero-Lag EMA is calculated on the JMA-smoothed momentum line. ZEMA works by computing two EMAs and extrapolating the difference to cancel out the inherent lag:
ema1 = ta.ema(src, len)
ema2 = ta.ema(ema1, len)
zema = ema1 + (ema1 - ema2)
Crossovers between the momentum line and the ZEMA signal line generate potential entry and exit signals. The indicator scores each crossover based on the angle of approach, distance from the midline, and volume context to produce a "cross quality" rating.
4. Schmitt Trigger State Machine
Rather than using simple threshold crossings (which produce whipsaws), the indicator uses a Schmitt trigger — a hysteresis-based state machine where the entry threshold differs from the exit threshold. For example, the momentum line must cross above 62 to enter a bullish state, but must drop below 55 to exit it. This prevents rapid flip-flopping in choppy conditions and produces cleaner, more tradeable state transitions.
5. Dynamic VWMA Bands
Volume-Weighted Moving Average bands are calculated around the momentum line. These bands expand when volume is high (indicating conviction) and contract when volume is low (indicating indecision). Price touching or exceeding the bands while momentum is extended signals potential exhaustion or continuation depending on the volume context.
Features
Gradient Histogram: A color-gradient histogram below the momentum line shows the distance from the midline (50). Colors shift smoothly from muted near the center to vivid at extremes, providing instant visual feedback on momentum intensity without cluttering the chart
Neon Glow Rendering: The main momentum line uses a multi-layer plot technique where progressively wider, more transparent copies of the line are stacked to create a subtle glow effect that intensifies with momentum strength
Momentum Divergence Detection: The indicator detects both regular and hidden divergences using fractal pivot anchoring. When price makes a new high but the Laguerre RSI makes a lower high (bearish divergence), or price makes a new low but the oscillator makes a higher low (bullish divergence), the indicator draws divergence lines and labels
Velocity and Acceleration Tracking: First and second derivatives of the momentum line are calculated and smoothed. Velocity shows the rate of momentum change; acceleration shows whether momentum is speeding up or slowing down. These are displayed in the dashboard
OB/OS Exhaustion Detection: When momentum reaches extreme overbought or oversold levels with declining velocity, the indicator flags potential exhaustion points where reversals are more likely
Cross Quality Scoring: Each momentum/signal crossover is scored 0-100 based on the angle of the cross, distance from the midline, and whether volume confirms the move. Higher scores indicate higher-conviction crosses
Band Squeeze Detection: When VWMA bands contract below a threshold, the indicator identifies a "squeeze" condition — compressed momentum that often precedes a sharp expansion move
Midline Conviction Signals: Crosses of the 50 midline are tracked with volume confirmation to identify shifts in the underlying momentum bias
Momentum Regime Classification: The dashboard classifies the current momentum state as Trending Bull, Trending Bear, Ranging, or Transitional based on the composite of all sub-systems
16-Row Dashboard: A comprehensive real-time table displays Laguerre RSI, JMA momentum, ZEMA signal, state, velocity, acceleration, cross quality, band width, squeeze status, divergence history, regime classification, and more
Input Parameters
Laguerre Core:
Alpha: Damping factor for the Laguerre filter (default: 0.07). Lower = smoother, higher = faster
JMA Smoothing:
Period: JMA smoothing length (default: 8)
Phase: Lead/lag adjustment from -100 to +100 (default: -50)
Power: Responsiveness curve (default: 0.6)
Signal Line:
ZEMA Length: Period for the zero-lag signal line (default: 13)
State Thresholds:
Bull Entry/Exit: Schmitt trigger thresholds for bullish state (default: 62/55)
Bear Entry/Exit: Schmitt trigger thresholds for bearish state (default: 38/45)
VWMA Bands:
Band Length: VWMA calculation period (default: 20)
Band Width: Multiplier for band distance (default: 1.5)
Visuals:
Toggles for histogram, glow, divergence lines, bar coloring, background zones, squeeze markers, and dashboard
How to Use This Indicator
Step 1: Identify the Momentum Regime
Check the dashboard's regime classification. In trending regimes, look for pullback entries in the direction of the trend. In ranging regimes, look for mean-reversion setups at the VWMA band extremes.
Step 2: Wait for Schmitt Trigger State Transitions
Rather than acting on every oscillator wiggle, wait for the Schmitt trigger to confirm a state change. A transition from neutral to bullish (momentum crossing above the bull threshold with hysteresis) is a higher-conviction signal than a simple RSI crossing 50.
Step 3: Confirm with Cross Quality
When a momentum/signal crossover occurs, check the cross quality score. Scores above 60 indicate strong, angled crosses with volume confirmation. Scores below 30 suggest weak, flat crosses that are more likely to fail.
Step 4: Watch for Divergences
Divergences between price and the Laguerre RSI often precede reversals. Regular divergences signal potential trend changes; hidden divergences signal trend continuation. Use these in conjunction with the regime classification for context.
Step 5: Monitor Squeeze and Exhaustion
Band squeezes indicate compressed momentum — prepare for a breakout. Exhaustion signals at OB/OS extremes with declining velocity suggest the current move is losing steam.
Indicator Limitations
Like all momentum oscillators, this indicator is a lagging derivative of price. It confirms moves rather than predicting them
The Laguerre filter's alpha parameter significantly affects behavior — values that work well on one timeframe or instrument may need adjustment for others
Divergence detection uses fractal pivots which require a right-bar confirmation delay (default 5 bars). Divergences are identified after the fact, not in real-time
The Schmitt trigger prevents whipsaws but also delays state transitions. In fast-moving markets, the state change may come after a significant portion of the move has already occurred
Volume-based features (VWMA bands, cross quality scoring) work best on instruments with reliable volume data. On forex or instruments with synthetic volume, these features may be less meaningful
This is a momentum tool, not a complete trading system. It should be combined with trend structure, support/resistance, and risk management for actual trading decisions
Originality Statement
This indicator is original in its synthesis of multiple advanced signal processing techniques into a unified momentum analysis system. While individual components (Laguerre filters, JMA smoothing, ZEMA, Schmitt triggers) are established concepts in technical analysis and signal processing, this indicator is justified because:
The Laguerre-to-JMA-to-ZEMA processing chain creates a momentum signal with properties not achievable by any single technique alone — the Laguerre provides the raw momentum extraction, JMA provides adaptive noise filtering, and ZEMA provides a lag-compensated reference
The Schmitt trigger state machine replaces simple threshold crossings with hysteresis-based transitions, substantially reducing false signals in choppy conditions
Cross quality scoring provides a quantitative measure of signal conviction that is not available in standard oscillator implementations
The integration of velocity, acceleration, exhaustion detection, squeeze detection, and divergence analysis into a single coherent pane eliminates the need for multiple separate indicators
Dynamic VWMA bands provide volume-contextual overbought/oversold boundaries rather than fixed levels
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any indicator does not guarantee future results. The momentum readings, state classifications, and signals displayed are mathematical calculations based on historical price data — they do not predict future price movement. Always use proper risk management and conduct your own analysis before making trading decisions. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Индикатор Pine Script®






















