OPEN-SOURCE SCRIPT

RSI Analytic Volume Matrix [RAVM]

204
Overview

RSI Analytic Volume Matrix [RAVM] is an overlay indicator that turns classic RSI into a multi-layered market-reading engine. Instead of treating RSI 30 and 70 as simple buy/sell lines, RAVM combines RSI geometry (angle and acceleration), statistical volume analysis, and a 5×5 VSA-inspired matrix to describe what is really happening inside each candle.
The script is designed as an educational and analytical tool. It does not generate trading signals. Instead, it helps you read the market context, understand where the pressure is coming from (buyers vs. sellers), and see how price, momentum, and volume interact in real time.

Concept & Philosophy

RAVM is built around a hierarchical logic and a few core ideas:
• Hierarchical State Machine: First, RSI defines a context (where we are in the 0–100 range). Then the geometric engine evaluates the angle-of-turn of RSI using a Z-Score. Only after a meaningful geometric event is detected does the system promote a bar to a potential setup (warning vs. confirmed).
• Geometric Primacy: The angle and acceleration of RSI (RSI geometry) are more important than the raw RSI level itself. RAVM uses a geometric veto: if the geometric trigger is not confirmed, the confidence score is capped below 50%, even if volume looks interesting.
• RSI Beyond 30 and 70: Being above 70 or below 30 is not treated as an automatic overbought/oversold signal. RAVM treats those zones as contextual factors that contribute only a partial portion of the final score, alongside geometry, total volume expansion, buy/sell balance, and delta power.
• Volume Decomposition: Volume is decomposed into total, buy-side, sell-side, and delta components. Each of these is normalized with a Z-Score over a shared statistical window, so RSI geometry and volume live in the same statistical context.
• Educational Scoring Pipeline: RAVM builds a 0–100 "Quantum Score" for each detected setup. The score expresses how strong the story is across four dimensions: geometry (RSI angle-of-turn), total volume expansion, which side is driving that volume (buyers vs. sellers), and the power of delta. The score is designed for learning and weighting, not for mechanical trade entries.
• VSA Matrix Engine: A 5×5 matrix combines momentum states and volume dynamics. Each cell corresponds to an interpreted VSA-style scenario (Absorption, Distribution, No Demand, Stopping Volume, Strong Reversal, etc.), shown both as text and as a heatmap dashboard on the chart.

How RAVM Works

1. RSI Context & Geometry

RAVM starts with a classic RSI, but it does not stop at simple level checks. It computes the velocity and acceleration of RSI and normalizes them via a Z-Score to produce an Angle-of-Turn metric (Z-AoT). This Z-AoT is then mapped into a 0–1 intensity value called MSI (Momentum Shift Intensity).
The script monitors both classic RSI zones (around 30 and 70) and geometric triggers. Entering the lower or upper zone is treated as a contextual event only. A setup becomes "confirmed" when a significant geometric turn is detected (based on Z-AoT thresholds). Otherwise, the bar is at most a warning.

2. Volume & Statistical Engine

The volume engine can work in two modes: a geometric approximation (based on candle structure) or a more precise intrabar mode using up/down volume requests. In both cases, RAVM builds a volume packet consisting of:
• Total volume
• Buy-side volume
• Sell-side volume
• Delta (buy – sell)
Each of these series is normalized using a Z-Score over the same statistical window that is used for RSI geometry. This allows RAVM to answer questions such as: Is total volume exceptional on this bar? Is the expansion mostly coming from buyers or from sellers? Is delta unusually strong or weak compared to recent history?

3. Scoring System (Quantum Score)

For each bar where a setup is active, RAVM computes a 0–100 score intended as an educational confidence measure. The scoring pipeline follows this sequence:
A. RSI Geometry (MSI): Measures the strength of the RSI angle-of-turn via Z-AoT. This has geometric primacy over simple level checks.
B. RSI Zone Context: Being below 30 or above 70 contributes only a partial bonus to the score, reflecting the idea that these zones are context, not automatic signals. Mildly supportive zones (e.g., RSI below 50 for bullish contexts) can also contribute with lower weight.
C. Total Volume Expansion: A normalized Volume Power term expresses how exceptional the total volume is relative to its recent distribution. If there is no meaningful volume expansion, the score remains modest even if RSI geometry looks interesting.
D. Which Side Is Driving the Volume: RAVM then checks whether the expansion is primarily on the buy side or the sell side, using Z-Score statistics for buy and sell volume separately. This stage does not yet rely on delta as a power metric; it simply answers the question: "Is this expansion mostly driven by buyers, sellers, or both?"
E. Delta as Final Power: Only at the final stage does the script bring in delta and its Z-Score as a measure of how one-sided the pressure really is. A strong negative delta during a bullish context, for example, can highlight absorption, while a strong positive delta against a bearish context can highlight distribution or a buying climax.
If a setup is not geometrically confirmed (for example, a simple entry into RSI 30/70 without a strong geometric turn), RAVM caps the final score below 50%. This "Geometric Veto" enforces the idea that RSI geometry must confirm before a scenario can be considered high-confidence.

4. Overlay UI & Smart Labels

RAVM is an overlay indicator: all information is drawn directly on the price chart, not in a separate pane. When a setup is active, a smart label is attached to the bar, together with a vertical connector line. Each label shows:
• Direction of the setup (bullish or bearish)
• Trigger type (classic OS/OB vs. geometric/hidden)
• Status (warning vs. confirmed)
• Quantum Score as a percentage
Confirmed setups use stronger colors and solid connectors, while warnings use softer colors and dotted connectors. The script also manages label placement to avoid overlap, keeping the chart clean and readable.
In addition to labels, a dashboard table is drawn on the chart. It displays the currently active matrix scenario, the dominant bias, a short textual interpretation, the full 5×5 heatmap, and summary metrics such as RSI, MSI, and Volume Power.

RSI Is Not Just 30 and 70

One of the central design decisions in RAVM is to treat RSI 30 and 70 as context, not as fixed buy/sell buttons. Many traders mechanically assume that RSI below 30 means "buy" and RSI above 70 means "sell". RAVM explicitly rejects this simplification.
Instead, the script asks a series of deeper questions: How sharp is the angle-of-turn of RSI right now? Is total volume expanding or contracting? Is that expansion dominated by buyers or sellers? Is delta confirming the move, or is there a hidden absorption or distribution taking place?
In the scoring logic, being in a lower or upper RSI zone contributes only part of the final score. Geometry, volume expansion, the buy/sell split, and delta power all have to align before a high-confidence scenario emerges. This makes RAVM much closer to a structured market-reading tool than a classic overbought/oversold indicator.

Matrix User Manual – Reading the 5×5 Grid
The heart of RAVM is its 5×5 matrix, where the vertical axis represents momentum states (M1–M5) and the horizontal axis represents volume dynamics (V1–V5). Each cell in this grid corresponds to a VSA-style scenario. The dashboard highlights the currently active cell and prints a textual description so you can read the story at a glance.


1. Confirmation Scenarios
These scenarios occur when momentum direction and volume expansion are aligned:
• Bullish Confirmation / Strong Reversal: Momentum is shifting strongly upward (often from a depressed RSI context), and expanded volume is driven mainly by buyers. Often seen as a strong bullish reversal or continuation signal from a VSA perspective.
• Bearish Confirmation / Strong Drop: Momentum is turning decisively downward, and expanded volume is driven mainly by sellers. This maps to strong bearish continuation or sharp reversal patterns.
2. Absorption & Stopping Volume
• Absorption: Total volume expands, but the dominant flow is opposite to the recent price move or the geometric bias. For example, heavy selling volume while the geometric context is bullish. This can indicate smart money quietly absorbing orders from the crowd.
• Stopping Volume: Exceptionally high volume appears near the end of an extended move, while momentum begins to decelerate. Price may still print new extremes, but the effort vs. result relationship signals potential exhaustion and the possibility of a turn.
3. Distribution & Buying Climax
• Distribution: Heavy buying volume appears within a bearish or topping context. Rather than healthy accumulation, this often represents larger players offloading inventory to late buyers. The matrix will typically flag this as a bearish-leaning scenario despite strong upside prints.
• Buying Climax: A surge of buy-side volume near the end of a strong uptrend, with momentum starting to weaken. From a VSA point of view, this is often the last push where retail aggressively buys what smart money is selling.
4. No Demand & No Supply
• No Demand: Price attempts to rise but does so on low, non-expansive volume. The market is not interested in following the move, and the lack of participation often precedes weakness or sideways action.
• No Supply: Price tries to push lower on thin volume. Selling pressure is limited, and the lack of supply can precede stabilization or recovery if buyers step back in.
5. Trend Exhaustion
• Uptrend Exhaustion: Momentum remains nominally bullish, but the quality of volume deteriorates (e.g., more effort, less net result). The matrix marks this as an uptrend losing internal strength, often after a series of aggressive moves.
• Downtrend Exhaustion: Similar logic in the opposite direction: strong prior downtrend, but increasingly inefficient downside progress relative to the volume invested. This can precede accumulation or a relief rally.
6. Effort vs. Result Scenarios
• Bullish Effort, Little Result: Buyers invest notable volume, but price progress is limited. This may reveal hidden selling into strength or a lack of follow-through from the broader market.
• Bearish Effort, Little Result: Sellers push volume, but price does not decline proportionally. This can indicate absorption of selling pressure and potential underlying demand.
7. Neutral, Churn & Thin Markets
• Neutral / Thin Market: Momentum and volume both remain muted. RAVM marks these as neutral cells where aggressive decision-making is usually less attractive and observing the broader structure is more important.
• High Volume Churn / Volatility: Both sides are active with high volume but limited directional progress. This can correspond to battle zones, local ranges, or high volatility rotations where the main message is conflict rather than clear trend.
Inputs & Options
RAVM includes several input groups to adapt the tool to your preferences:
• Localization: Multiple language options for all labels and dashboard text (e.g., English, Farsi, Turkish, Russian).
• RSI Core Settings: RSI length, source, and upper/lower contextual zones (typically around 30 and 70).
• Geometric Engine: Z-AoT sigma thresholds, confirmation ratios, and normalization window multiplier. These control how sensitive the script is to RSI angle-of-turn events.
• Volume Engine: Choice between geometric approximation and intrabar up/down volume, Z-Score thresholds for volume expansion, and related parameters.
• Visual Interface: Toggles for smart labels, dashboard table, font sizes, dashboard position, and color themes for bullish, bearish, and warning states.

Disclaimer
RSI Analytic Volume Matrix [RAVM] is provided for educational and research purposes only. It does not constitute financial advice and is not a signal generator. Any trading decisions you make based on this tool, or any other, are entirely your own responsibility. Always consider your own risk management rules and conduct your own analysis.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.