OPEN-SOURCE SCRIPT
Aggiornato

Grok/Claude Quantum Signal Pro * Grok/Claude X Series*

93
Grok/Claude Quantum Signal Pro

This is a TradingView indicator focused on catching momentum reversals at price extremes, with a sophisticated divergence detection system as its standout feature. The "Quantum" branding is marketing flair — under the hood, it's a well-structured combination of momentum oscillators, volatility bands, and divergence analysis working together to identify high-probability turning points.
Core Philosophy
The indicator asks: "Is price at an extreme level where momentum is exhausted, and is there evidence that a reversal or continuation is likely?"
It approaches this by requiring multiple confirming factors before generating a signal. Price must be at a band extreme, momentum indicators must be at extreme readings, and the market must be trending (not choppy). Optionally, it can also require RSI divergence and volume confirmation.
The Dynamic Envelope Bands
The foundation is an adaptive channel built around a moving average (EMA or SMA, user's choice). The bands extend above and below this centerline using ATR (Average True Range) multiplied by a dynamic factor.
What makes these bands "adaptive" is that the multiplier adjusts based on ADX — when trends are stronger, the bands widen to accommodate larger directional moves. In weaker trend environments, the bands stay tighter. This helps the bands stay relevant across different market conditions rather than being too loose in quiet markets or too tight during volatile trends.
The centerline itself is color-coded based on its slope: green when rising, red when falling, yellow when flat. This gives immediate visual feedback on short-term directional bias.
The Multi-Layer Filter System
Signals must pass through several filters before being displayed. Here's what each filter does:
FilterWhat It ChecksDefault StateADX TrendingIs ADX above threshold (20)? Avoids signals in choppy, directionless marketsRequired (always on)RSI ExtremesIs RSI oversold (<30) for buys, overbought (>70) for sells?Required (always on)Fisher TransformIs Fisher below -2.0 for buys, above +2.0 for sells? Confirms momentum exhaustionRequired (always on)Trend AlignmentIs price above/below the trend EMA in the right direction?Optional (off by default)Volume SurgeIs current volume significantly above average?Optional (off by default)DivergenceIs there an active RSI divergence pattern?Optional (off by default)
The Fisher Transform
The Fisher Transform is a lesser-known oscillator that converts price into a Gaussian normal distribution, making extreme values much more pronounced. When Fisher readings hit +2.0 or -2.0, it indicates statistically significant momentum exhaustion. By requiring both RSI and Fisher to be at extremes simultaneously, the indicator filters out many false signals that would occur using just one oscillator.
The Detrended Price Oscillator (DPO)
The indicator also calculates DPO, which removes the trend component from price to show where current price sits relative to a historical average. This is displayed in the info panel as a percentage — positive values mean price is extended above its typical level, negative values mean it's extended below. This helps gauge how "stretched" price is from its mean.
RSI Divergence Detection — The Core Feature
This is where the indicator really shines. It detects both regular divergences (reversal signals) and hidden divergences (continuation signals).
Regular Divergences
Regular divergences suggest potential reversals:
Regular Bullish Divergence: Price makes a lower low, but RSI makes a higher low. This indicates that despite price falling further, selling momentum is actually weakening — a potential bottom signal. These are marked with cyan/light blue solid lines on the chart.
Regular Bearish Divergence: Price makes a higher high, but RSI makes a lower high. Despite price rising further, buying momentum is weakening — a potential top signal. Also marked with cyan solid lines.
Hidden Divergences
Hidden divergences suggest trend continuation (often overlooked by traders):
Hidden Bullish Divergence: Price makes a higher low, but RSI makes a lower low. The uptrend is healthy (higher lows in price), but RSI dipped lower, creating a "hidden" bullish setup that often precedes another leg up. Marked with purple dashed lines.
Hidden Bearish Divergence: Price makes a lower high, but RSI makes a higher high. The downtrend structure is intact, but RSI bounced higher, suggesting another leg down is coming. Also marked with purple dashed lines.
The divergence detection uses pivot points (local highs and lows) to identify the comparison points. Users can adjust the pivot lookback (how many bars to use for pivot identification) and the maximum lookback window for finding divergence pairs.
Signal Generation Logic
A buy signal fires when all these conditions align:

Market is trending (ADX above threshold)
RSI is in oversold territory (below 30)
Fisher Transform is oversold (below -2.0)
Plus any optional filters that are enabled

A sell signal requires the mirror conditions: trending market, overbought RSI (above 70), and overbought Fisher (above +2.0).
There's also a cooldown mechanism requiring at least 5 bars between signals to prevent clustering.
Visual Elements
The indicator provides layered visual information:

Adaptive bands with color-coded centerline (green/red/yellow based on slope)
Cloud fill between bands, colored by trend direction
Signal arrows (triangles) at entry points
Price labels showing exact entry price at each signal
Divergence lines connecting the pivot points that form the divergence pattern
Divergence labels ("REG BULL", "HID BEAR", etc.) with tooltips explaining what each pattern means
Info panel showing current status of all indicators and any active divergences

The Info Panel
The top-right panel displays real-time status for all the indicator components. Each row is color-coded to show whether that factor is currently bullish, bearish, or neutral. The last two rows specifically track whether regular and hidden divergences are currently active, making it easy to see at a glance if a divergence pattern has recently formed.
Alert System
The indicator includes a comprehensive alert system covering not just buy/sell signals, but also "setup building" conditions (when RSI and Fisher are at extremes but ADX hasn't confirmed yet), market regime changes (trending to ranging and vice versa), and individual divergence detections for all four types.
Summary
This indicator is designed for traders who want to catch reversals at price extremes with multiple layers of confirmation. Its strength lies in the divergence detection system, which identifies both potential reversals and trend continuation setups. The modular filter system lets users dial in their preferred level of strictness — from the default configuration that requires just the core filters, to a highly selective mode requiring trend alignment, volume confirmation, and divergence all at once. It's best suited for swing trading or identifying key turning points on higher timeframes.
Note di rilascio
Bug fix

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.