OPEN-SOURCE SCRIPT
Quantum RCI Fusion

Description:
Overview: The Quantum Momentum Engine Quantum RCI Fusion is a sophisticated momentum oscillator designed to solve the #1 problem of classic indicators: false signals in sideways markets. At the core of this script is the Rank Correlation Index (RCI), a powerful statistical tool based on Spearman’s correlation. Unlike RSI or Stochastic which only look at price levels, the RCI evaluates the "quality" of a trend by measuring the temporal correlation of price ranks.
This script is not just a line drawing: it is a complete trading ecosystem that fuses three RCI timeframes, volatility filters, and a real-time Risk Management simulation.
🛠 How It Works: The "Fusion" Logic
The strength of this indicator lies in the synergy between its components. It is not a simple mashup, but a filtered logical system:
Triple RCI Engine (Fast, Mid, Slow):
Fast (13) & Mid (18): These generate the Crossover signal for precise entry timing.
Slow (30) - The "Trend Shield": The true innovation. It acts as a directional shield; if the baseline is bullish, the script protects Long positions by ignoring premature exit signals, allowing you to ride the full trend.
HMA Smoothing: Raw price data passes through a Hull Moving Average before the RCI calculation. This drastically reduces market "noise" without sacrificing the responsiveness typical of the RCI.
Intelligent Filters (Anti-Whipsaw):
ADX Integration: Signals are blocked if the ADX is below the threshold (default 20), preventing trading in flat/ranging markets.
Momentum Impulse: Requires a minimum variation (Delta) in the RCI to confirm that the move has real drive and is not just random fluctuation.
🛡 Risk Management & Simulation
Since timing is useless without risk management, Quantum RCI Fusion includes a Dashboard and sophisticated exit logic:
Multiple Exits:
Take Profit / Stop Loss: Based on dynamic ATR multipliers.
Shield Break: Safety exit if the underlying trend (Slow RCI) changes direction.
Emergency: Immediate close if momentum sharply reverses across the zero line.
Live Dashboard: Monitors Win Rate, virtual PnL, and Trade Status (Long/Short/Scanning) in real-time directly on the chart, removing the need for external backtesters.
🚀 How to Use It
Setup: Add the script to a separate pane below your price chart.
Entry Signals:
LONG (Green Triangle): RCI Fast crosses Mid upwards + Oversold Zone (< -80) + ADX > 20 + Bullish Shield.
SHORT (Red Triangle): RCI Fast crosses Mid downwards + Overbought Zone (> 80) + ADX > 20 + Bearish Shield.
Customization:
Scalping: Reduce RCI lengths (e.g., 8/12/20) and disable the "Trend Shield" for quick entries and exits.
Swing Trading: Keep defaults and use the ATR Trailing logic to manage positions on H4 or Daily timeframes.
⚖️ Notes & Credits
Originality: This script enhances the standard RCI by implementing Array-based calculations (optimized for Pine v6), proprietary HMA smoothing, and unique "Trend Shield" logic.
Open Source: The code is released under the MPL 2.0 license. Credits to the Pine community for the foundational mathematical formulas of Spearman's correlation.
Disclaimer: The statistics shown in the dashboard are simulations based on live data and do not guarantee future profits. You are responsible for your own trading decisions.
🖼 Instructions for the Publication Chart (Preview)
To ensure your script gets approved and attracts users, follow these steps for the cover image:
Symbol: Use a volatile and liquid asset, e.g., BTCUSD or XAUUSD (Gold), on a 1H or 4H timeframe.
Clean Layout: Remove all other indicators from the chart (no Moving Averages on price, no Bollinger Bands). The focus must be solely on your script in the bottom pane.
Visualization:
Ensure the Dashboard (stats table) is clearly visible and does not obscure the most recent candle.
The chart should show at least one clear BUY and one clear SELL signal, ideally with the exit icons (the "X" or flags) visible to demonstrate the exit logic.
Overview: The Quantum Momentum Engine Quantum RCI Fusion is a sophisticated momentum oscillator designed to solve the #1 problem of classic indicators: false signals in sideways markets. At the core of this script is the Rank Correlation Index (RCI), a powerful statistical tool based on Spearman’s correlation. Unlike RSI or Stochastic which only look at price levels, the RCI evaluates the "quality" of a trend by measuring the temporal correlation of price ranks.
This script is not just a line drawing: it is a complete trading ecosystem that fuses three RCI timeframes, volatility filters, and a real-time Risk Management simulation.
🛠 How It Works: The "Fusion" Logic
The strength of this indicator lies in the synergy between its components. It is not a simple mashup, but a filtered logical system:
Triple RCI Engine (Fast, Mid, Slow):
Fast (13) & Mid (18): These generate the Crossover signal for precise entry timing.
Slow (30) - The "Trend Shield": The true innovation. It acts as a directional shield; if the baseline is bullish, the script protects Long positions by ignoring premature exit signals, allowing you to ride the full trend.
HMA Smoothing: Raw price data passes through a Hull Moving Average before the RCI calculation. This drastically reduces market "noise" without sacrificing the responsiveness typical of the RCI.
Intelligent Filters (Anti-Whipsaw):
ADX Integration: Signals are blocked if the ADX is below the threshold (default 20), preventing trading in flat/ranging markets.
Momentum Impulse: Requires a minimum variation (Delta) in the RCI to confirm that the move has real drive and is not just random fluctuation.
🛡 Risk Management & Simulation
Since timing is useless without risk management, Quantum RCI Fusion includes a Dashboard and sophisticated exit logic:
Multiple Exits:
Take Profit / Stop Loss: Based on dynamic ATR multipliers.
Shield Break: Safety exit if the underlying trend (Slow RCI) changes direction.
Emergency: Immediate close if momentum sharply reverses across the zero line.
Live Dashboard: Monitors Win Rate, virtual PnL, and Trade Status (Long/Short/Scanning) in real-time directly on the chart, removing the need for external backtesters.
🚀 How to Use It
Setup: Add the script to a separate pane below your price chart.
Entry Signals:
LONG (Green Triangle): RCI Fast crosses Mid upwards + Oversold Zone (< -80) + ADX > 20 + Bullish Shield.
SHORT (Red Triangle): RCI Fast crosses Mid downwards + Overbought Zone (> 80) + ADX > 20 + Bearish Shield.
Customization:
Scalping: Reduce RCI lengths (e.g., 8/12/20) and disable the "Trend Shield" for quick entries and exits.
Swing Trading: Keep defaults and use the ATR Trailing logic to manage positions on H4 or Daily timeframes.
⚖️ Notes & Credits
Originality: This script enhances the standard RCI by implementing Array-based calculations (optimized for Pine v6), proprietary HMA smoothing, and unique "Trend Shield" logic.
Open Source: The code is released under the MPL 2.0 license. Credits to the Pine community for the foundational mathematical formulas of Spearman's correlation.
Disclaimer: The statistics shown in the dashboard are simulations based on live data and do not guarantee future profits. You are responsible for your own trading decisions.
🖼 Instructions for the Publication Chart (Preview)
To ensure your script gets approved and attracts users, follow these steps for the cover image:
Symbol: Use a volatile and liquid asset, e.g., BTCUSD or XAUUSD (Gold), on a 1H or 4H timeframe.
Clean Layout: Remove all other indicators from the chart (no Moving Averages on price, no Bollinger Bands). The focus must be solely on your script in the bottom pane.
Visualization:
Ensure the Dashboard (stats table) is clearly visible and does not obscure the most recent candle.
The chart should show at least one clear BUY and one clear SELL signal, ideally with the exit icons (the "X" or flags) visible to demonstrate the exit logic.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.