OPEN-SOURCE SCRIPT
Quantum RSI Fusion

Quantum RSI Fusion
This indicator was created by inspiration from the "Ultimate RSI" indicator by @LuxAlgo. Full credit and acknowledgment to LuxAlgo for the original RSI concept, foundational logic, and innovative approach to momentum oscillator design that served as the starting point for this implementation. This version was developed, restructured, and expanded by The Scalping Ant with additional features, modularity, comprehensive customization options, and structural refinements described in detail below.
What This Indicator Does
Quantum RSI Fusion is a sophisticated momentum oscillator displayed in a dedicated panel below your price chart. At its core, it produces a custom RSI value oscillating between 0 and 100, but unlike conventional RSI implementations, this version employs a range-normalized momentum calculation that fundamentally changes how price movement is interpreted and quantified.
The indicator outputs several interconnected visual and analytical components:
The primary output is the custom RSI line itself, which measures momentum through a unique lens focused on price range dynamics rather than simple directional closes. Layered on top of this is a configurable signal line — a smoothed moving average of the RSI that serves as the reference for crossover-based entry and exit signals. The space between the RSI and its signal line is filled with a color-coded ribbon that instantly communicates whether momentum is currently bullish or bearish and whether that momentum is accelerating or decelerating based on ribbon width.

Beyond these primary elements, the indicator provides optional macro divergence detection using pivot-point analysis, an EMA-based trend filter that restricts signals to align with the dominant market direction, higher timeframe RSI sourcing for multi-timeframe confluence, customizable overbought and oversold zone visualization, the ability to color your main chart candles based on the RSI momentum state, and a multi-layer confluence matrix panel that synthesizes all active analytical components into an instant directional assessment.
All crossover signals incorporate an optional candle-close confirmation mechanism that eliminates repainting, ensuring that once a signal appears on your chart, it remains there permanently and will not disappear due to subsequent price action.
How It Works — The Range-Normalized RSI Calculation Explained
Understanding the mathematical foundation of this RSI variant is essential for using it effectively, as it behaves differently from the standard Wilder RSI found in most trading platforms.
Standard Wilder RSI Review
The conventional RSI, developed by J. Welles Wilder Jr., calculates momentum by comparing the average magnitude of recent gains to the average magnitude of recent losses over a specified lookback period. Specifically, it computes the ratio of smoothed upward price changes to smoothed absolute price changes, then normalizes the result to a 0–100 scale. This approach treats every bar equally — a 1% gain on a low-volatility day counts the same as a 1% gain on a high-volatility day.
The Range-Normalized Approach
Quantum RSI Fusion takes a fundamentally different approach. Instead of measuring bar-to-bar price changes in isolation, it contextualizes each bar's movement within the dynamic price range established over the lookback period.
The calculation proceeds as follows:
First, the indicator identifies the highest high and lowest low over the RSI length lookback period, establishing the current trading range. This range represents the boundaries of recent price action and serves as the normalization reference.
Next, for each bar, the indicator evaluates how the range boundaries have changed:
-When the upper boundary expands — meaning the current bar's high exceeds the previous highest high within the lookback — the full range distance (highest high minus lowest low) is recorded as the directional movement value. This treats range expansion to the upside as a strong bullish signal, capturing breakout momentum in a way that standard RSI cannot.
-When the lower boundary contracts — meaning the current bar's low undercuts the previous lowest low within the lookback — the full range distance is recorded as negative directional movement. This captures breakdown momentum and treats range expansion to the downside as a strong bearish signal.
When neither boundary changes — the price action remains contained within the existing range — the simple bar-to-bar price change (current close minus previous close) is used as the directional movement value, similar to conventional momentum measurement.
This directional movement value is then smoothed using RMA (Running Moving Average, also known as Wilder's Smoothing Method) and normalized using the formula:
(RMA of directional movement / RMA of absolute directional movement) × 50 + 50
The result is a momentum oscillator that inherently responds to volatility and range dynamics. When markets are breaking out of consolidation, the RSI moves aggressively because the full range expansion is captured. When markets are consolidating within an established range, the RSI responds to the smaller bar-to-bar movements and tends to oscillate around the midline.
Volume Weighting Option
When the volume weighting option is enabled, each bar's directional movement is multiplied by its volume before the RMA smoothing is applied. This means that bars with higher trading volume have proportionally greater influence on the RSI value than low-volume bars.
Volume weighted RSI above, standard RSI below:

The rationale is straightforward: price movements backed by significant volume represent stronger conviction and should carry more weight in momentum calculations. A breakout on heavy volume will push the RSI more aggressively than an identical price movement on light volume. Conversely, low-volume noise has reduced impact on the oscillator.
This feature is particularly valuable for stocks, futures, and cryptocurrencies where volume data is reliable and meaningful. For instruments where volume data is absent, unreliable, or represents only a fraction of total market activity (such as spot forex from a single broker), volume weighting should remain disabled.
The Signal Line — Purpose, Methods, and Interaction
The signal line is a moving average calculated from the RSI values, serving multiple purposes within the indicator's framework.
Purpose of the Signal Line
The signal line smooths the RSI to reduce noise and provide a reference point for crossover-based signals. When the RSI crosses above the signal line, it indicates that current momentum is accelerating relative to recent average momentum — a bullish development. When the RSI crosses below the signal line, current momentum is decelerating relative to its recent average — a bearish development.
The signal line also anchors the ribbon fill visualization. The width of the ribbon between RSI and signal represents the magnitude of momentum acceleration or deceleration. A wide ribbon indicates strong directional conviction; a narrow ribbon approaching zero indicates an imminent crossover and potential momentum shift.
Available Smoothing Methods
Four smoothing methods are available for the signal line, each with distinct characteristics:
-EMA (Exponential Moving Average) applies greater weight to recent RSI values, making the signal line more responsive to current conditions. This produces earlier crossover signals but may generate more false signals during choppy price action.
-SMA (Simple Moving Average) applies equal weight to all RSI values within the lookback period. This produces a balanced signal line that is neither overly reactive nor excessively lagged, suitable for most trading styles.
-RMA (Running Moving Average / Wilder's Smoothing) is mathematically similar to EMA but with a longer effective lookback due to its smoothing constant calculation. This produces the smoothest signal line among single-pass averages and matches the smoothing philosophy used in classic RSI implementations. This is the default setting.
-TMA (Triangular Moving Average) applies SMA twice — it calculates an SMA of the RSI, then calculates an SMA of that result. This double-smoothing produces the smoothest and most lagged signal line, filtering out nearly all short-term noise. TMA is ideal for traders focused on larger swings who want to avoid frequent crossovers.
Selecting the Appropriate Method
Scalpers and short-term traders may prefer EMA for faster signals. Swing traders and position traders may prefer RMA or TMA for smoother, higher-conviction signals. The signal length parameter works in conjunction with the method choice — shorter lengths with EMA produce the most reactive signal line, while longer lengths with TMA produce the least reactive.
Crossover Signals and the Non-Repainting Mechanism
The primary trading signals generated by this indicator are based on RSI-to-signal-line crossovers.
Bullish Entry Signal
A bullish entry signal is generated when the RSI crosses above the signal line. This crossover indicates that current momentum has accelerated above its recent average, suggesting increasing bullish pressure. The signal is displayed as a green dot at the bottom of the indicator panel.

Bearish Entry Signal
A bearish entry signal is generated when the RSI crosses below the signal line. This crossover indicates that current momentum has decelerated below its recent average, suggesting increasing bearish pressure. The signal is displayed as a red dot at the top of the indicator panel.

The Repainting Problem and Solution
Repainting occurs when an indicator displays a signal while a candle is still forming, then removes or relocates that signal after subsequent price action invalidates the condition. This creates false historical records where the chart appears to show perfect signals that never actually existed in real-time. Repainting indicators produce misleading backtest results and unreliable live trading signals.
Quantum RSI Fusion addresses repainting through the "Confirm Signals at Candle Close" option, which is enabled by default.
When enabled, crossover signals are evaluated using the barstate.isconfirmed condition, which returns true only after a candle has fully closed and its values are finalized. This means:
A bullish crossover that occurs during an intrabar price spike will not display a signal until the candle closes. If the crossover is negated before close, no signal ever appears.
Once a signal appears after candle close, it is permanent. The historical record accurately reflects only signals that were confirmed in real-time.
Backtesting results align with what a live trader would have experienced, enabling realistic strategy evaluation.
When disabled, signals appear in real-time as the candle forms. This provides earlier notification of potential setups but comes with the explicit understanding that signals may appear and subsequently disappear if price reverses before candle close. This mode is appropriate only for traders who want real-time monitoring of forming conditions and fully understand the repainting implications.
Trend Filter — Aligning Signals with Market Direction
The optional EMA-based trend filter restricts crossover signals to those aligned with the prevailing market trend, significantly reducing false signals in trending markets.
How the Trend Filter Works
An Exponential Moving Average of the specified length (default 200 periods) is calculated on the close price of the current chart timeframe. This EMA serves as a dynamic trend reference:
-When the current close is above the EMA, the market is considered to be in an uptrend.
-When the current close is below the EMA, the market is considered to be in a downtrend.
-With the trend filter enabled:
-Bullish crossover signals appear only when price is above the EMA (uptrend confirmed).
-Bearish crossover signals appear only when price is below the EMA (downtrend confirmed).
Counter-trend signals are suppressed entirely. A bullish RSI crossover that occurs while price is below the EMA will not generate a signal. A bearish RSI crossover while price is above the EMA will not generate a signal.
Rationale and Use Cases
Trend-following is among the most robust trading methodologies across markets and timeframes. By filtering signals to align with the trend, the indicator eliminates many low-probability setups where momentum is temporarily shifting against the dominant direction only to resume trend shortly after.
The 200-period EMA is a widely recognized long-term trend reference on daily charts. On intraday charts, 200 periods represent the trend over the most recent 200 bars of the selected timeframe. Traders may adjust this value based on their timeframe and style:
-Shorter EMAs (50–100) capture intermediate-term trends and allow more signals through.
-Longer EMAs (200+) capture only major trends and filter more aggressively.
For ranging markets, mean-reversion strategies, or when intentionally trading counter-trend rotations, the trend filter should be disabled to allow all crossover signals.
Higher Timeframe RSI — Multi-Timeframe Analysis
The higher timeframe RSI feature allows you to source the RSI calculation from a timeframe higher than your chart, enabling multi-timeframe confluence without switching charts.
Example of a 15 m timeframe and 4 h higher timeframe

Practical Application
Consider a trader viewing a 5-minute chart for entry timing. With HTF RSI enabled and set to 60 minutes (1 hour), the indicator displays the hourly RSI values on the 5-minute chart. This provides visibility into the larger-timeframe momentum context:
If the hourly RSI is in a bullish state (above signal line, above midline), the trader knows that the higher timeframe momentum supports bullish entries and may be more confident taking long setups.
If the hourly RSI is in a bearish state, the trader may avoid bullish setups or tighten risk management knowing they are trading against higher-timeframe momentum.
Non-Repainting Implementation
The higher timeframe data is fetched using request.security() with lookahead explicitly set to barmerge.lookahead_off. This prevents the indicator from accessing future HTF data that would not have been available in real-time.
The HTF RSI value updates only when a new bar closes on the higher timeframe. Between HTF bar closes, the value remains constant. This is correct and expected behavior — it reflects the actual information that would have been available to a trader monitoring the higher timeframe in real-time.
Macro Divergence Detection — Identifying Potential Reversals
Classical divergences between price and momentum oscillators are among the most powerful early warning signals for potential trend exhaustion and reversal. Quantum RSI Fusion includes a pivot-based macro divergence detection system.
Understanding Classical Divergences
-Bullish Divergence occurs when price makes a lower low (new swing low below the previous swing low) while the RSI makes a higher low (the RSI value at the new price low is higher than the RSI value at the previous price low). This divergence indicates that although price is reaching new lows, the selling momentum required to push it there is weakening. The underlying energy driving the downtrend is dissipating, which often precedes a reversal or significant bounce.
-Bearish Divergence occurs when price makes a higher high (new swing high above the previous swing high) while the RSI makes a lower high (the RSI value at the new price high is lower than the RSI value at the previous price high). This divergence indicates that although price is reaching new highs, the buying momentum required to push it there is weakening. The underlying energy driving the uptrend is dissipating, which often precedes a reversal or pullback.
Example of divergences:

Pivot-Based Detection Method
The indicator identifies divergences using pivot point analysis. A pivot low is confirmed when a bar's RSI value is lower than the RSI values of a specified number of bars to its left (Pivot Left Lookback) and a specified number of bars to its right (Pivot Right Lookback). A pivot high is confirmed analogously for RSI highs.
The Pivot Right Lookback parameter is critical: it represents the number of bars required to confirm that a pivot has occurred. A pivot can only be identified after these confirmation bars have elapsed. This means divergence signals inherently appear with a delay equal to the Pivot Right Lookback value.
The divergence labels are plotted with a negative offset equal to Pivot Right Lookback, placing them at the correct historical bar where the pivot actually occurred. This maintains accurate visual alignment on the chart.
Non-Repainting Characteristics
Because pivots require right-side confirmation before being identified, divergence signals do not repaint in the traditional sense. Once a divergence label appears on the chart, it will not disappear. However, traders must understand that divergences are not real-time signals — they are identified only after confirmation, meaning the actual pivot occurred several bars earlier.
This is an inherent characteristic of pivot-based divergence detection across all platforms and indicators, not a limitation specific to this implementation. The delay is the cost of confirmation reliability.
Using Divergences Effectively
Divergences are confluence tools, not standalone entry signals. A divergence indicates potential exhaustion but does not guarantee reversal. Price can continue trending despite divergence, sometimes for extended periods.
Effective divergence usage involves:
Combining divergence with other confirming factors such as support/resistance levels, candlestick patterns, or trend filter alignment.
Waiting for price confirmation after divergence appears, such as a subsequent bullish crossover signal following a bullish divergence.
Recognizing that divergences on higher timeframes carry more significance than those on lower timeframes.
Overbought and Oversold Zones — Contextualizing Extreme Readings
The indicator includes configurable overbought and oversold levels with optional background highlighting.
Adjusted Default Levels
The default overbought level is set to 60 and the default oversold level is set to 40, rather than the traditional 70/30 levels used with standard RSI.
This adjustment reflects the mathematical characteristics of the range-normalized RSI calculation. Because this RSI responds to range dynamics rather than simple directional closes, its values tend to cluster closer to the 50 midline than standard Wilder RSI. The oscillator spends more time in the 40–60 zone and reaches traditional extreme levels (above 70 or below 30) less frequently.
The adjusted default levels ensure that overbought and oversold readings occur with meaningful frequency while still representing genuine extreme conditions.
Customization Guidelines
Traders should adjust these levels based on their specific instrument and timeframe:
Highly volatile instruments that exhibit wider RSI swings may warrant more extreme levels (65–70 overbought, 30–35 oversold).
Lower volatility instruments or longer timeframes where the RSI rarely reaches extremes may warrant tighter levels (55–60 overbought, 40–45 oversold).
Observing the RSI behavior on historical data for your specific instrument will reveal the appropriate levels for that context.
Background Visualization
When the "Show Overbought/Oversold Background" option is enabled, the zones above the overbought level (to 100) and below the oversold level (to 0) are filled with subtle colored backgrounds. This provides immediate visual recognition when the RSI enters extreme territory without requiring precise level monitoring.

Midline Reference and Context Fills
The 50 midline serves as the equilibrium reference for the RSI. Values above 50 indicate net bullish momentum over the lookback period; values below 50 indicate net bearish momentum.
The indicator fills the space between the signal line and the midline with configurable colors:
When the signal line is above 50, the fill uses the "Midline Fill — Signal Above 50" color, providing a visual background indicating bullish bias.
When the signal line is below 50, the fill uses the "Midline Fill — Signal Below 50" color, indicating bearish bias.
This fill provides at-a-glance context for the overall momentum state beyond just the RSI-to-signal relationship. A bullish crossover that occurs while both the RSI and signal are above 50 represents momentum accelerating within an already bullish context — generally a higher-probability setup than a bullish crossover occurring below 50 where overall momentum remains bearish.
Main Chart Candle Coloring
When enabled, the "Color Main Chart Candles" option overlays colored candles on your price chart based on the RSI-to-signal-line relationship:
Candles are colored with the bullish ribbon color when the RSI is above the signal line.
Candles are colored with the bearish ribbon color when the RSI is below the signal line.

This feature allows traders to monitor momentum state directly on the price chart without visually referencing the indicator panel. It is particularly useful for traders who prefer minimalist chart setups or who want momentum context while focusing on price action and structure.
The colored candles are overlaid using TradingView's force_overlay capability, which projects the candle plot from this non-overlay indicator onto the main price chart.
Alert System — Comprehensive Notification Coverage
Quantum RSI Fusion includes eight configurable alert conditions covering all significant indicator events:
-Bullish Entry Signal — Triggers when the RSI crosses above the signal line with confirmation (if enabled). The alert message includes the ticker symbol and timeframe for context.
-Bearish Entry Signal — Triggers when the RSI crosses below the signal line with confirmation (if enabled).
-Bullish Macro Divergence — Triggers when a bullish divergence is detected and confirmed via pivot analysis.
-Bearish Macro Divergence — Triggers when a bearish divergence is detected and confirmed.
-RSI Entered Overbought Zone — Triggers when the RSI value rises above the overbought level.
-RSI Entered Oversold Zone — Triggers when the RSI value falls below the oversold level.
-RSI Crossed Above Midline — Triggers when the RSI crosses above 50, indicating a shift from bearish to bullish momentum.
-RSI Crossed Below Midline — Triggers when the RSI crosses below 50, indicating a shift from bullish to bearish momentum.
All alert messages include {{ticker}} and {{interval}} placeholders, which TradingView automatically replaces with the symbol and timeframe when the alert triggers. This ensures you know exactly which chart generated the alert when monitoring multiple instruments.
Matrix Panel — Multi-Layer Confluence Dashboard
The matrix panel is an optional on-chart dashboard that provides instant visual assessment of the indicator's multiple analytical layers and their alignment status. Rather than requiring the trader to mentally synthesize information from the oscillator panel, trend context, and multiple timeframes, the matrix presents a consolidated view of each layer's current state and a computed confluence result.
Understanding the Matrix Structure
The matrix displays four rows, each representing a distinct analytical layer:
Row 1 — Macro Trend
This row reflects the EMA-based trend filter status. When the trend filter is enabled and price is above the EMA, the status displays "BULLISH" in the configured bullish color. When price is below the EMA, it displays "BEARISH" in the bearish color. When the trend filter is disabled in the indicator settings, this row displays "DISABLED" in the neutral color.
The macro trend represents the highest-level directional context based on the price chart itself, independent of the RSI oscillator. It answers the question: "What is the overall market direction according to the EMA?"
Row 2 — HTF RSI
This row reflects the higher timeframe RSI momentum status. When the HTF RSI feature is enabled and the higher timeframe RSI value is above 50 (the equilibrium midline), the status displays "BULLISH." When the HTF RSI is below 50, it displays "BEARISH." When the HTF RSI feature is disabled, this row displays "DISABLED."
The HTF RSI provides momentum context from a larger timeframe, helping traders understand whether the broader market momentum supports their current timeframe analysis. A trader on a 15-minute chart can instantly see whether the hourly or 4-hour RSI momentum aligns with their setup.
Row 3 — Micro RSI
This row reflects the current chart timeframe's RSI-to-signal-line relationship. When the RSI is above its signal line, indicating bullish momentum acceleration, the status displays "BULLISH." When the RSI is below the signal line, indicating bearish momentum, it displays "BEARISH."
This layer is never disabled as it represents the core functionality of the indicator. It answers the question: "What is the immediate momentum direction based on the RSI crossover system?"
Row 4 — Result
The result row synthesizes all enabled layers and displays a confluence-based directional bias:
LONG — Displayed when ALL enabled layers align bullish. If the trend filter is enabled, price must be above the EMA. If the HTF RSI is enabled, it must be above 50. The micro RSI must be above the signal line. When all conditions that are active simultaneously agree on bullish direction, the result is LONG. This represents maximum confluence for bullish positioning.
SHORT — Displayed when ALL enabled layers align bearish. If the trend filter is enabled, price must be below the EMA. If the HTF RSI is enabled, it must be below 50. The micro RSI must be below the signal line. When all active conditions agree on bearish direction, the result is SHORT. This represents maximum confluence for bearish positioning.
WAIT — Displayed when enabled layers conflict or contradict each other. For example, if the macro trend is bullish (price above EMA) but the micro RSI is bearish (RSI below signal), the result is WAIT. This indicates that the analytical layers are not aligned and the trader should wait for confluence before committing to a directional position.
Confluence Logic and Disabled Layers
When a layer is disabled, it is treated as neutral in the confluence calculation — it neither supports nor blocks the result. This means:
If you disable the trend filter, only the HTF RSI (if enabled) and micro RSI are evaluated for confluence. If both agree bullish, the result is LONG even though the trend filter is not contributing.
If you disable both the trend filter and HTF RSI, only the micro RSI determines the result — LONG when RSI is above signal, SHORT when below.
This flexible logic allows traders to customize which layers they consider important for their strategy while still receiving a synthesized confluence assessment based on their active configuration.
Customization Options
The matrix panel includes extensive customization to fit various chart themes and preferences:
Position can be set to any of six locations: Top Right, Middle Right, Bottom Right, Top Left, Middle Left, or Bottom Left. Choose a position that does not obstruct your view of the RSI oscillator or critical price levels.
Text size can be adjusted from Tiny to Large depending on your screen resolution and chart size.
Header background color controls the left column (row labels). Default is black for high contrast with white text.
Value background color controls the right column (status values). Default is white to make the colored status text clearly visible.
Bullish, bearish, and neutral text colors can be customized to match your chart color scheme or personal preference.
Practical Use of the Matrix
The matrix serves as a decision-support tool that reduces cognitive load during trading. Instead of separately checking:
Is price above or below the trend EMA?
Is the higher timeframe RSI bullish or bearish?
Is the current RSI above or below its signal?
Do all of these align?
The trader simply glances at the matrix result:
A LONG result provides confidence that all configured analytical layers support bullish positioning. Combined with a fresh bullish crossover signal, this represents a high-confluence long entry.
A SHORT result provides confidence that all configured analytical layers support bearish positioning. Combined with a fresh bearish crossunder signal, this represents a high-confluence short entry.
A WAIT result warns the trader that conditions are mixed. Even if a crossover signal appears, the lack of full confluence suggests caution. The trader may choose to pass on the trade, reduce position size, or wait for the conflicting layer to align.
The matrix does not generate trading signals itself — the crossover signals (green and red dots) remain the primary entry triggers. The matrix provides contextual assessment of whether those signals are supported by broader confluence.
How Components Work Together as an Integrated System
The individual features of Quantum RSI Fusion are designed to interact and reinforce each other:
The range-normalized RSI provides a momentum reading sensitive to volatility dynamics. The signal line smooths this reading to define trend direction within the oscillator. Crossovers between RSI and signal identify momentum acceleration shifts.
The trend filter ensures these momentum shifts align with the larger price trend, filtering out low-probability counter-trend signals. The candle-close confirmation ensures signals are final and non-repainting.
Divergences provide early warning of potential trend exhaustion, alerting traders to monitor for subsequent crossover signals that would confirm the reversal. The overbought/oversold zones contextualize divergences — a bullish divergence occurring in oversold territory carries more weight than one occurring near the midline.
The higher timeframe RSI option allows traders to verify that their current-timeframe signals align with higher-timeframe momentum, providing multi-timeframe confluence without chart switching.
The matrix panel synthesizes all of these layers into a single confluence assessment, immediately showing the trader whether conditions are aligned (LONG/SHORT) or conflicted (WAIT).


The visual system — ribbon fills, midline fills, candle coloring — provides instant pattern recognition without requiring numerical analysis, enabling faster decision-making.
Practical Application Across Markets and Trading Styles
This indicator is designed for universal application across all markets and asset classes where TradingView provides data: stocks, ETFs, forex, cryptocurrencies, futures, indices, bonds, and commodities.
Scalping (1-minute to 5-minute charts)
For scalping, consider reducing the RSI length and signal length to 7–10 for faster response. Use EMA smoothing for the signal line. The trend filter can use a shorter EMA (50–100 periods) to define the intraday trend, or be disabled entirely if scalping mean-reversion setups. Keep candle-close confirmation enabled to ensure signals are reliable, accepting the one-candle delay. Volume weighting can be valuable for instruments with reliable volume data, helping to emphasize moves with participation. Divergences are less relevant on very short timeframes due to noise. The matrix provides instant confluence checks even at high-speed trading paces.
Day Trading (5-minute to 1-hour charts)
Default settings work well for day trading. The 14-period RSI and signal with RMA smoothing provide balanced sensitivity. Enable the trend filter with a 100–200 period EMA appropriate to your timeframe. Keep candle-close confirmation enabled. Consider enabling HTF RSI to monitor hourly or 4-hour momentum while timing entries on lower timeframes. Divergences can provide useful context for potential intraday reversals. The matrix is particularly valuable for day traders managing multiple instruments, providing at-a-glance confluence status.
Swing Trading (1-hour to Daily charts)
For swing trading, default or slightly longer settings (RSI 14–21, signal 14–21) work well. RMA or TMA smoothing reduces noise for multi-day holds. Enable the 200-period EMA trend filter to align with the dominant trend. Enable divergences to identify potential swing reversal points — divergences on these timeframes carry significant weight. HTF RSI (daily while on 4-hour, or weekly while on daily) provides valuable context. The matrix helps confirm swing entries by showing alignment across all timeframes and trend layers.
Position Trading and Investing (Daily to Weekly charts)
For longer-term positions, use extended RSI and signal lengths (21–50) to smooth out daily noise and focus on significant momentum shifts. Use the 200-period EMA trend filter to identify primary trends. Divergences on daily and weekly timeframes can signal major inflection points. TMA smoothing for the signal line provides the cleanest long-term signal. The matrix can be configured with HTF RSI on weekly or monthly timeframes to confirm major trend alignment for portfolio-level decisions.
What Makes This Implementation Original
While inspired by LuxAlgo's Ultimate RSI concept, this implementation includes substantial structural differences and additions:
-The range-normalized momentum calculation responds to high-low range dynamics rather than close-to-close changes, providing different behavior during breakouts, breakdowns, and consolidations compared to standard RSI.
-Optional volume weighting integrates participation data into momentum measurement.
-Four selectable signal smoothing methods allow customization of signal line responsiveness.
-The integrated EMA trend filter with user-configurable length provides trend alignment without requiring a separate indicator.
-Pivot-based macro divergence detection with configurable lookback parameters identifies classical divergences automatically.
-Higher timeframe RSI sourcing enables multi-timeframe analysis within a single indicator.
-The candle-close confirmation system provides robust non-repainting guarantees for all crossover signals.
-The multi-layer confluence matrix panel synthesizes trend filter status, HTF RSI bias, and current RSI state into an instant LONG/SHORT/WAIT assessment — a unique decision-support feature not found in standard RSI implementations.
-Full alert coverage across eight distinct conditions enables comprehensive automated monitoring.
-Customizable visual elements including ribbon colors, midline fills, overbought/oversold backgrounds, main chart candle coloring, and extensive matrix styling options allow adaptation to any chart theme and visual preference.
-These components work together as a unified system rather than a collection of independent features, with each element reinforcing signal quality and context.
Disclaimer
This indicator is a technical analysis tool intended for educational and informational purposes. It does not constitute financial advice, investment advice, trading advice, or any other form of advice. No indicator, regardless of sophistication, can predict future price movements with certainty or guarantee profitable trading outcomes.
Trading financial instruments involves substantial risk of loss. You should only trade with capital you can afford to lose. Past performance of any trading system, methodology, or indicator is not indicative of future results.
Always conduct your own research, combine indicator signals with your own analysis of market structure and context, apply proper risk management including appropriate position sizing and stop-loss placement, and consider consulting with a qualified financial advisor before making trading decisions.
The developer assumes no responsibility for any financial losses incurred through the use of this indicator.
This indicator was created by inspiration from the "Ultimate RSI" indicator by @LuxAlgo. Full credit and acknowledgment to LuxAlgo for the original RSI concept, foundational logic, and innovative approach to momentum oscillator design that served as the starting point for this implementation. This version was developed, restructured, and expanded by The Scalping Ant with additional features, modularity, comprehensive customization options, and structural refinements described in detail below.
What This Indicator Does
Quantum RSI Fusion is a sophisticated momentum oscillator displayed in a dedicated panel below your price chart. At its core, it produces a custom RSI value oscillating between 0 and 100, but unlike conventional RSI implementations, this version employs a range-normalized momentum calculation that fundamentally changes how price movement is interpreted and quantified.
The indicator outputs several interconnected visual and analytical components:
The primary output is the custom RSI line itself, which measures momentum through a unique lens focused on price range dynamics rather than simple directional closes. Layered on top of this is a configurable signal line — a smoothed moving average of the RSI that serves as the reference for crossover-based entry and exit signals. The space between the RSI and its signal line is filled with a color-coded ribbon that instantly communicates whether momentum is currently bullish or bearish and whether that momentum is accelerating or decelerating based on ribbon width.
Beyond these primary elements, the indicator provides optional macro divergence detection using pivot-point analysis, an EMA-based trend filter that restricts signals to align with the dominant market direction, higher timeframe RSI sourcing for multi-timeframe confluence, customizable overbought and oversold zone visualization, the ability to color your main chart candles based on the RSI momentum state, and a multi-layer confluence matrix panel that synthesizes all active analytical components into an instant directional assessment.
All crossover signals incorporate an optional candle-close confirmation mechanism that eliminates repainting, ensuring that once a signal appears on your chart, it remains there permanently and will not disappear due to subsequent price action.
How It Works — The Range-Normalized RSI Calculation Explained
Understanding the mathematical foundation of this RSI variant is essential for using it effectively, as it behaves differently from the standard Wilder RSI found in most trading platforms.
Standard Wilder RSI Review
The conventional RSI, developed by J. Welles Wilder Jr., calculates momentum by comparing the average magnitude of recent gains to the average magnitude of recent losses over a specified lookback period. Specifically, it computes the ratio of smoothed upward price changes to smoothed absolute price changes, then normalizes the result to a 0–100 scale. This approach treats every bar equally — a 1% gain on a low-volatility day counts the same as a 1% gain on a high-volatility day.
The Range-Normalized Approach
Quantum RSI Fusion takes a fundamentally different approach. Instead of measuring bar-to-bar price changes in isolation, it contextualizes each bar's movement within the dynamic price range established over the lookback period.
The calculation proceeds as follows:
First, the indicator identifies the highest high and lowest low over the RSI length lookback period, establishing the current trading range. This range represents the boundaries of recent price action and serves as the normalization reference.
Next, for each bar, the indicator evaluates how the range boundaries have changed:
-When the upper boundary expands — meaning the current bar's high exceeds the previous highest high within the lookback — the full range distance (highest high minus lowest low) is recorded as the directional movement value. This treats range expansion to the upside as a strong bullish signal, capturing breakout momentum in a way that standard RSI cannot.
-When the lower boundary contracts — meaning the current bar's low undercuts the previous lowest low within the lookback — the full range distance is recorded as negative directional movement. This captures breakdown momentum and treats range expansion to the downside as a strong bearish signal.
When neither boundary changes — the price action remains contained within the existing range — the simple bar-to-bar price change (current close minus previous close) is used as the directional movement value, similar to conventional momentum measurement.
This directional movement value is then smoothed using RMA (Running Moving Average, also known as Wilder's Smoothing Method) and normalized using the formula:
(RMA of directional movement / RMA of absolute directional movement) × 50 + 50
The result is a momentum oscillator that inherently responds to volatility and range dynamics. When markets are breaking out of consolidation, the RSI moves aggressively because the full range expansion is captured. When markets are consolidating within an established range, the RSI responds to the smaller bar-to-bar movements and tends to oscillate around the midline.
Volume Weighting Option
When the volume weighting option is enabled, each bar's directional movement is multiplied by its volume before the RMA smoothing is applied. This means that bars with higher trading volume have proportionally greater influence on the RSI value than low-volume bars.
Volume weighted RSI above, standard RSI below:
The rationale is straightforward: price movements backed by significant volume represent stronger conviction and should carry more weight in momentum calculations. A breakout on heavy volume will push the RSI more aggressively than an identical price movement on light volume. Conversely, low-volume noise has reduced impact on the oscillator.
This feature is particularly valuable for stocks, futures, and cryptocurrencies where volume data is reliable and meaningful. For instruments where volume data is absent, unreliable, or represents only a fraction of total market activity (such as spot forex from a single broker), volume weighting should remain disabled.
The Signal Line — Purpose, Methods, and Interaction
The signal line is a moving average calculated from the RSI values, serving multiple purposes within the indicator's framework.
Purpose of the Signal Line
The signal line smooths the RSI to reduce noise and provide a reference point for crossover-based signals. When the RSI crosses above the signal line, it indicates that current momentum is accelerating relative to recent average momentum — a bullish development. When the RSI crosses below the signal line, current momentum is decelerating relative to its recent average — a bearish development.
The signal line also anchors the ribbon fill visualization. The width of the ribbon between RSI and signal represents the magnitude of momentum acceleration or deceleration. A wide ribbon indicates strong directional conviction; a narrow ribbon approaching zero indicates an imminent crossover and potential momentum shift.
Available Smoothing Methods
Four smoothing methods are available for the signal line, each with distinct characteristics:
-EMA (Exponential Moving Average) applies greater weight to recent RSI values, making the signal line more responsive to current conditions. This produces earlier crossover signals but may generate more false signals during choppy price action.
-SMA (Simple Moving Average) applies equal weight to all RSI values within the lookback period. This produces a balanced signal line that is neither overly reactive nor excessively lagged, suitable for most trading styles.
-RMA (Running Moving Average / Wilder's Smoothing) is mathematically similar to EMA but with a longer effective lookback due to its smoothing constant calculation. This produces the smoothest signal line among single-pass averages and matches the smoothing philosophy used in classic RSI implementations. This is the default setting.
-TMA (Triangular Moving Average) applies SMA twice — it calculates an SMA of the RSI, then calculates an SMA of that result. This double-smoothing produces the smoothest and most lagged signal line, filtering out nearly all short-term noise. TMA is ideal for traders focused on larger swings who want to avoid frequent crossovers.
Selecting the Appropriate Method
Scalpers and short-term traders may prefer EMA for faster signals. Swing traders and position traders may prefer RMA or TMA for smoother, higher-conviction signals. The signal length parameter works in conjunction with the method choice — shorter lengths with EMA produce the most reactive signal line, while longer lengths with TMA produce the least reactive.
Crossover Signals and the Non-Repainting Mechanism
The primary trading signals generated by this indicator are based on RSI-to-signal-line crossovers.
Bullish Entry Signal
A bullish entry signal is generated when the RSI crosses above the signal line. This crossover indicates that current momentum has accelerated above its recent average, suggesting increasing bullish pressure. The signal is displayed as a green dot at the bottom of the indicator panel.
Bearish Entry Signal
A bearish entry signal is generated when the RSI crosses below the signal line. This crossover indicates that current momentum has decelerated below its recent average, suggesting increasing bearish pressure. The signal is displayed as a red dot at the top of the indicator panel.
The Repainting Problem and Solution
Repainting occurs when an indicator displays a signal while a candle is still forming, then removes or relocates that signal after subsequent price action invalidates the condition. This creates false historical records where the chart appears to show perfect signals that never actually existed in real-time. Repainting indicators produce misleading backtest results and unreliable live trading signals.
Quantum RSI Fusion addresses repainting through the "Confirm Signals at Candle Close" option, which is enabled by default.
When enabled, crossover signals are evaluated using the barstate.isconfirmed condition, which returns true only after a candle has fully closed and its values are finalized. This means:
A bullish crossover that occurs during an intrabar price spike will not display a signal until the candle closes. If the crossover is negated before close, no signal ever appears.
Once a signal appears after candle close, it is permanent. The historical record accurately reflects only signals that were confirmed in real-time.
Backtesting results align with what a live trader would have experienced, enabling realistic strategy evaluation.
When disabled, signals appear in real-time as the candle forms. This provides earlier notification of potential setups but comes with the explicit understanding that signals may appear and subsequently disappear if price reverses before candle close. This mode is appropriate only for traders who want real-time monitoring of forming conditions and fully understand the repainting implications.
Trend Filter — Aligning Signals with Market Direction
The optional EMA-based trend filter restricts crossover signals to those aligned with the prevailing market trend, significantly reducing false signals in trending markets.
How the Trend Filter Works
An Exponential Moving Average of the specified length (default 200 periods) is calculated on the close price of the current chart timeframe. This EMA serves as a dynamic trend reference:
-When the current close is above the EMA, the market is considered to be in an uptrend.
-When the current close is below the EMA, the market is considered to be in a downtrend.
-With the trend filter enabled:
-Bullish crossover signals appear only when price is above the EMA (uptrend confirmed).
-Bearish crossover signals appear only when price is below the EMA (downtrend confirmed).
Counter-trend signals are suppressed entirely. A bullish RSI crossover that occurs while price is below the EMA will not generate a signal. A bearish RSI crossover while price is above the EMA will not generate a signal.
Rationale and Use Cases
Trend-following is among the most robust trading methodologies across markets and timeframes. By filtering signals to align with the trend, the indicator eliminates many low-probability setups where momentum is temporarily shifting against the dominant direction only to resume trend shortly after.
The 200-period EMA is a widely recognized long-term trend reference on daily charts. On intraday charts, 200 periods represent the trend over the most recent 200 bars of the selected timeframe. Traders may adjust this value based on their timeframe and style:
-Shorter EMAs (50–100) capture intermediate-term trends and allow more signals through.
-Longer EMAs (200+) capture only major trends and filter more aggressively.
For ranging markets, mean-reversion strategies, or when intentionally trading counter-trend rotations, the trend filter should be disabled to allow all crossover signals.
Higher Timeframe RSI — Multi-Timeframe Analysis
The higher timeframe RSI feature allows you to source the RSI calculation from a timeframe higher than your chart, enabling multi-timeframe confluence without switching charts.
Example of a 15 m timeframe and 4 h higher timeframe
Practical Application
Consider a trader viewing a 5-minute chart for entry timing. With HTF RSI enabled and set to 60 minutes (1 hour), the indicator displays the hourly RSI values on the 5-minute chart. This provides visibility into the larger-timeframe momentum context:
If the hourly RSI is in a bullish state (above signal line, above midline), the trader knows that the higher timeframe momentum supports bullish entries and may be more confident taking long setups.
If the hourly RSI is in a bearish state, the trader may avoid bullish setups or tighten risk management knowing they are trading against higher-timeframe momentum.
Non-Repainting Implementation
The higher timeframe data is fetched using request.security() with lookahead explicitly set to barmerge.lookahead_off. This prevents the indicator from accessing future HTF data that would not have been available in real-time.
The HTF RSI value updates only when a new bar closes on the higher timeframe. Between HTF bar closes, the value remains constant. This is correct and expected behavior — it reflects the actual information that would have been available to a trader monitoring the higher timeframe in real-time.
Macro Divergence Detection — Identifying Potential Reversals
Classical divergences between price and momentum oscillators are among the most powerful early warning signals for potential trend exhaustion and reversal. Quantum RSI Fusion includes a pivot-based macro divergence detection system.
Understanding Classical Divergences
-Bullish Divergence occurs when price makes a lower low (new swing low below the previous swing low) while the RSI makes a higher low (the RSI value at the new price low is higher than the RSI value at the previous price low). This divergence indicates that although price is reaching new lows, the selling momentum required to push it there is weakening. The underlying energy driving the downtrend is dissipating, which often precedes a reversal or significant bounce.
-Bearish Divergence occurs when price makes a higher high (new swing high above the previous swing high) while the RSI makes a lower high (the RSI value at the new price high is lower than the RSI value at the previous price high). This divergence indicates that although price is reaching new highs, the buying momentum required to push it there is weakening. The underlying energy driving the uptrend is dissipating, which often precedes a reversal or pullback.
Example of divergences:
Pivot-Based Detection Method
The indicator identifies divergences using pivot point analysis. A pivot low is confirmed when a bar's RSI value is lower than the RSI values of a specified number of bars to its left (Pivot Left Lookback) and a specified number of bars to its right (Pivot Right Lookback). A pivot high is confirmed analogously for RSI highs.
The Pivot Right Lookback parameter is critical: it represents the number of bars required to confirm that a pivot has occurred. A pivot can only be identified after these confirmation bars have elapsed. This means divergence signals inherently appear with a delay equal to the Pivot Right Lookback value.
The divergence labels are plotted with a negative offset equal to Pivot Right Lookback, placing them at the correct historical bar where the pivot actually occurred. This maintains accurate visual alignment on the chart.
Non-Repainting Characteristics
Because pivots require right-side confirmation before being identified, divergence signals do not repaint in the traditional sense. Once a divergence label appears on the chart, it will not disappear. However, traders must understand that divergences are not real-time signals — they are identified only after confirmation, meaning the actual pivot occurred several bars earlier.
This is an inherent characteristic of pivot-based divergence detection across all platforms and indicators, not a limitation specific to this implementation. The delay is the cost of confirmation reliability.
Using Divergences Effectively
Divergences are confluence tools, not standalone entry signals. A divergence indicates potential exhaustion but does not guarantee reversal. Price can continue trending despite divergence, sometimes for extended periods.
Effective divergence usage involves:
Combining divergence with other confirming factors such as support/resistance levels, candlestick patterns, or trend filter alignment.
Waiting for price confirmation after divergence appears, such as a subsequent bullish crossover signal following a bullish divergence.
Recognizing that divergences on higher timeframes carry more significance than those on lower timeframes.
Overbought and Oversold Zones — Contextualizing Extreme Readings
The indicator includes configurable overbought and oversold levels with optional background highlighting.
Adjusted Default Levels
The default overbought level is set to 60 and the default oversold level is set to 40, rather than the traditional 70/30 levels used with standard RSI.
This adjustment reflects the mathematical characteristics of the range-normalized RSI calculation. Because this RSI responds to range dynamics rather than simple directional closes, its values tend to cluster closer to the 50 midline than standard Wilder RSI. The oscillator spends more time in the 40–60 zone and reaches traditional extreme levels (above 70 or below 30) less frequently.
The adjusted default levels ensure that overbought and oversold readings occur with meaningful frequency while still representing genuine extreme conditions.
Customization Guidelines
Traders should adjust these levels based on their specific instrument and timeframe:
Highly volatile instruments that exhibit wider RSI swings may warrant more extreme levels (65–70 overbought, 30–35 oversold).
Lower volatility instruments or longer timeframes where the RSI rarely reaches extremes may warrant tighter levels (55–60 overbought, 40–45 oversold).
Observing the RSI behavior on historical data for your specific instrument will reveal the appropriate levels for that context.
Background Visualization
When the "Show Overbought/Oversold Background" option is enabled, the zones above the overbought level (to 100) and below the oversold level (to 0) are filled with subtle colored backgrounds. This provides immediate visual recognition when the RSI enters extreme territory without requiring precise level monitoring.
Midline Reference and Context Fills
The 50 midline serves as the equilibrium reference for the RSI. Values above 50 indicate net bullish momentum over the lookback period; values below 50 indicate net bearish momentum.
The indicator fills the space between the signal line and the midline with configurable colors:
When the signal line is above 50, the fill uses the "Midline Fill — Signal Above 50" color, providing a visual background indicating bullish bias.
When the signal line is below 50, the fill uses the "Midline Fill — Signal Below 50" color, indicating bearish bias.
This fill provides at-a-glance context for the overall momentum state beyond just the RSI-to-signal relationship. A bullish crossover that occurs while both the RSI and signal are above 50 represents momentum accelerating within an already bullish context — generally a higher-probability setup than a bullish crossover occurring below 50 where overall momentum remains bearish.
Main Chart Candle Coloring
When enabled, the "Color Main Chart Candles" option overlays colored candles on your price chart based on the RSI-to-signal-line relationship:
Candles are colored with the bullish ribbon color when the RSI is above the signal line.
Candles are colored with the bearish ribbon color when the RSI is below the signal line.
This feature allows traders to monitor momentum state directly on the price chart without visually referencing the indicator panel. It is particularly useful for traders who prefer minimalist chart setups or who want momentum context while focusing on price action and structure.
The colored candles are overlaid using TradingView's force_overlay capability, which projects the candle plot from this non-overlay indicator onto the main price chart.
Alert System — Comprehensive Notification Coverage
Quantum RSI Fusion includes eight configurable alert conditions covering all significant indicator events:
-Bullish Entry Signal — Triggers when the RSI crosses above the signal line with confirmation (if enabled). The alert message includes the ticker symbol and timeframe for context.
-Bearish Entry Signal — Triggers when the RSI crosses below the signal line with confirmation (if enabled).
-Bullish Macro Divergence — Triggers when a bullish divergence is detected and confirmed via pivot analysis.
-Bearish Macro Divergence — Triggers when a bearish divergence is detected and confirmed.
-RSI Entered Overbought Zone — Triggers when the RSI value rises above the overbought level.
-RSI Entered Oversold Zone — Triggers when the RSI value falls below the oversold level.
-RSI Crossed Above Midline — Triggers when the RSI crosses above 50, indicating a shift from bearish to bullish momentum.
-RSI Crossed Below Midline — Triggers when the RSI crosses below 50, indicating a shift from bullish to bearish momentum.
All alert messages include {{ticker}} and {{interval}} placeholders, which TradingView automatically replaces with the symbol and timeframe when the alert triggers. This ensures you know exactly which chart generated the alert when monitoring multiple instruments.
Matrix Panel — Multi-Layer Confluence Dashboard
The matrix panel is an optional on-chart dashboard that provides instant visual assessment of the indicator's multiple analytical layers and their alignment status. Rather than requiring the trader to mentally synthesize information from the oscillator panel, trend context, and multiple timeframes, the matrix presents a consolidated view of each layer's current state and a computed confluence result.
Understanding the Matrix Structure
The matrix displays four rows, each representing a distinct analytical layer:
Row 1 — Macro Trend
This row reflects the EMA-based trend filter status. When the trend filter is enabled and price is above the EMA, the status displays "BULLISH" in the configured bullish color. When price is below the EMA, it displays "BEARISH" in the bearish color. When the trend filter is disabled in the indicator settings, this row displays "DISABLED" in the neutral color.
The macro trend represents the highest-level directional context based on the price chart itself, independent of the RSI oscillator. It answers the question: "What is the overall market direction according to the EMA?"
Row 2 — HTF RSI
This row reflects the higher timeframe RSI momentum status. When the HTF RSI feature is enabled and the higher timeframe RSI value is above 50 (the equilibrium midline), the status displays "BULLISH." When the HTF RSI is below 50, it displays "BEARISH." When the HTF RSI feature is disabled, this row displays "DISABLED."
The HTF RSI provides momentum context from a larger timeframe, helping traders understand whether the broader market momentum supports their current timeframe analysis. A trader on a 15-minute chart can instantly see whether the hourly or 4-hour RSI momentum aligns with their setup.
Row 3 — Micro RSI
This row reflects the current chart timeframe's RSI-to-signal-line relationship. When the RSI is above its signal line, indicating bullish momentum acceleration, the status displays "BULLISH." When the RSI is below the signal line, indicating bearish momentum, it displays "BEARISH."
This layer is never disabled as it represents the core functionality of the indicator. It answers the question: "What is the immediate momentum direction based on the RSI crossover system?"
Row 4 — Result
The result row synthesizes all enabled layers and displays a confluence-based directional bias:
LONG — Displayed when ALL enabled layers align bullish. If the trend filter is enabled, price must be above the EMA. If the HTF RSI is enabled, it must be above 50. The micro RSI must be above the signal line. When all conditions that are active simultaneously agree on bullish direction, the result is LONG. This represents maximum confluence for bullish positioning.
SHORT — Displayed when ALL enabled layers align bearish. If the trend filter is enabled, price must be below the EMA. If the HTF RSI is enabled, it must be below 50. The micro RSI must be below the signal line. When all active conditions agree on bearish direction, the result is SHORT. This represents maximum confluence for bearish positioning.
WAIT — Displayed when enabled layers conflict or contradict each other. For example, if the macro trend is bullish (price above EMA) but the micro RSI is bearish (RSI below signal), the result is WAIT. This indicates that the analytical layers are not aligned and the trader should wait for confluence before committing to a directional position.
Confluence Logic and Disabled Layers
When a layer is disabled, it is treated as neutral in the confluence calculation — it neither supports nor blocks the result. This means:
If you disable the trend filter, only the HTF RSI (if enabled) and micro RSI are evaluated for confluence. If both agree bullish, the result is LONG even though the trend filter is not contributing.
If you disable both the trend filter and HTF RSI, only the micro RSI determines the result — LONG when RSI is above signal, SHORT when below.
This flexible logic allows traders to customize which layers they consider important for their strategy while still receiving a synthesized confluence assessment based on their active configuration.
Customization Options
The matrix panel includes extensive customization to fit various chart themes and preferences:
Position can be set to any of six locations: Top Right, Middle Right, Bottom Right, Top Left, Middle Left, or Bottom Left. Choose a position that does not obstruct your view of the RSI oscillator or critical price levels.
Text size can be adjusted from Tiny to Large depending on your screen resolution and chart size.
Header background color controls the left column (row labels). Default is black for high contrast with white text.
Value background color controls the right column (status values). Default is white to make the colored status text clearly visible.
Bullish, bearish, and neutral text colors can be customized to match your chart color scheme or personal preference.
Practical Use of the Matrix
The matrix serves as a decision-support tool that reduces cognitive load during trading. Instead of separately checking:
Is price above or below the trend EMA?
Is the higher timeframe RSI bullish or bearish?
Is the current RSI above or below its signal?
Do all of these align?
The trader simply glances at the matrix result:
A LONG result provides confidence that all configured analytical layers support bullish positioning. Combined with a fresh bullish crossover signal, this represents a high-confluence long entry.
A SHORT result provides confidence that all configured analytical layers support bearish positioning. Combined with a fresh bearish crossunder signal, this represents a high-confluence short entry.
A WAIT result warns the trader that conditions are mixed. Even if a crossover signal appears, the lack of full confluence suggests caution. The trader may choose to pass on the trade, reduce position size, or wait for the conflicting layer to align.
The matrix does not generate trading signals itself — the crossover signals (green and red dots) remain the primary entry triggers. The matrix provides contextual assessment of whether those signals are supported by broader confluence.
How Components Work Together as an Integrated System
The individual features of Quantum RSI Fusion are designed to interact and reinforce each other:
The range-normalized RSI provides a momentum reading sensitive to volatility dynamics. The signal line smooths this reading to define trend direction within the oscillator. Crossovers between RSI and signal identify momentum acceleration shifts.
The trend filter ensures these momentum shifts align with the larger price trend, filtering out low-probability counter-trend signals. The candle-close confirmation ensures signals are final and non-repainting.
Divergences provide early warning of potential trend exhaustion, alerting traders to monitor for subsequent crossover signals that would confirm the reversal. The overbought/oversold zones contextualize divergences — a bullish divergence occurring in oversold territory carries more weight than one occurring near the midline.
The higher timeframe RSI option allows traders to verify that their current-timeframe signals align with higher-timeframe momentum, providing multi-timeframe confluence without chart switching.
The matrix panel synthesizes all of these layers into a single confluence assessment, immediately showing the trader whether conditions are aligned (LONG/SHORT) or conflicted (WAIT).
The visual system — ribbon fills, midline fills, candle coloring — provides instant pattern recognition without requiring numerical analysis, enabling faster decision-making.
Practical Application Across Markets and Trading Styles
This indicator is designed for universal application across all markets and asset classes where TradingView provides data: stocks, ETFs, forex, cryptocurrencies, futures, indices, bonds, and commodities.
Scalping (1-minute to 5-minute charts)
For scalping, consider reducing the RSI length and signal length to 7–10 for faster response. Use EMA smoothing for the signal line. The trend filter can use a shorter EMA (50–100 periods) to define the intraday trend, or be disabled entirely if scalping mean-reversion setups. Keep candle-close confirmation enabled to ensure signals are reliable, accepting the one-candle delay. Volume weighting can be valuable for instruments with reliable volume data, helping to emphasize moves with participation. Divergences are less relevant on very short timeframes due to noise. The matrix provides instant confluence checks even at high-speed trading paces.
Day Trading (5-minute to 1-hour charts)
Default settings work well for day trading. The 14-period RSI and signal with RMA smoothing provide balanced sensitivity. Enable the trend filter with a 100–200 period EMA appropriate to your timeframe. Keep candle-close confirmation enabled. Consider enabling HTF RSI to monitor hourly or 4-hour momentum while timing entries on lower timeframes. Divergences can provide useful context for potential intraday reversals. The matrix is particularly valuable for day traders managing multiple instruments, providing at-a-glance confluence status.
Swing Trading (1-hour to Daily charts)
For swing trading, default or slightly longer settings (RSI 14–21, signal 14–21) work well. RMA or TMA smoothing reduces noise for multi-day holds. Enable the 200-period EMA trend filter to align with the dominant trend. Enable divergences to identify potential swing reversal points — divergences on these timeframes carry significant weight. HTF RSI (daily while on 4-hour, or weekly while on daily) provides valuable context. The matrix helps confirm swing entries by showing alignment across all timeframes and trend layers.
Position Trading and Investing (Daily to Weekly charts)
For longer-term positions, use extended RSI and signal lengths (21–50) to smooth out daily noise and focus on significant momentum shifts. Use the 200-period EMA trend filter to identify primary trends. Divergences on daily and weekly timeframes can signal major inflection points. TMA smoothing for the signal line provides the cleanest long-term signal. The matrix can be configured with HTF RSI on weekly or monthly timeframes to confirm major trend alignment for portfolio-level decisions.
What Makes This Implementation Original
While inspired by LuxAlgo's Ultimate RSI concept, this implementation includes substantial structural differences and additions:
-The range-normalized momentum calculation responds to high-low range dynamics rather than close-to-close changes, providing different behavior during breakouts, breakdowns, and consolidations compared to standard RSI.
-Optional volume weighting integrates participation data into momentum measurement.
-Four selectable signal smoothing methods allow customization of signal line responsiveness.
-The integrated EMA trend filter with user-configurable length provides trend alignment without requiring a separate indicator.
-Pivot-based macro divergence detection with configurable lookback parameters identifies classical divergences automatically.
-Higher timeframe RSI sourcing enables multi-timeframe analysis within a single indicator.
-The candle-close confirmation system provides robust non-repainting guarantees for all crossover signals.
-The multi-layer confluence matrix panel synthesizes trend filter status, HTF RSI bias, and current RSI state into an instant LONG/SHORT/WAIT assessment — a unique decision-support feature not found in standard RSI implementations.
-Full alert coverage across eight distinct conditions enables comprehensive automated monitoring.
-Customizable visual elements including ribbon colors, midline fills, overbought/oversold backgrounds, main chart candle coloring, and extensive matrix styling options allow adaptation to any chart theme and visual preference.
-These components work together as a unified system rather than a collection of independent features, with each element reinforcing signal quality and context.
Disclaimer
This indicator is a technical analysis tool intended for educational and informational purposes. It does not constitute financial advice, investment advice, trading advice, or any other form of advice. No indicator, regardless of sophistication, can predict future price movements with certainty or guarantee profitable trading outcomes.
Trading financial instruments involves substantial risk of loss. You should only trade with capital you can afford to lose. Past performance of any trading system, methodology, or indicator is not indicative of future results.
Always conduct your own research, combine indicator signals with your own analysis of market structure and context, apply proper risk management including appropriate position sizing and stop-loss placement, and consider consulting with a qualified financial advisor before making trading decisions.
The developer assumes no responsibility for any financial losses incurred through the use of this indicator.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.