OPEN-SOURCE SCRIPT
已更新

Institutional Momentum & Liquidity Matrix

1 137

Institutional Momentum & Liquidity Matrix

■Overview
This tool is a quantitative analysis suite designed to bridge the gap between price momentum and market liquidity structure. Moving away from the traditional approach of monitoring "where the RSI is currently," it calculates the exact price required for the RSI to reach overbought/oversold levels on the next candle and visualizes it directly on the chart. This projection is overlaid with an RSI-Anomaly Volume Profile to highlight true structural exhaustion.

■1. Originality and Design Philosophy
While RSI and Volume Profile are widely used, they are typically viewed in isolation, leading to false signals. This script is original because it mathematically merges them:
1. It projects the theoretical elastic limits of momentum directly onto the price scale using algebraic reversal of Wilder's Smoothing.
Pine Script®
// Algebraic Reversal of Wilder's Smoothing (RMA) f_get_reverse_price(target_rsi) => float target_rs = target_rsi / (100.0 - target_rsi) float req_up = (target_rs * prev_rma_d * (rsi_len - 1)) - (prev_rma_u * (rsi_len - 1)) float req_down = (prev_rma_u * (rsi_len - 1) / target_rs) - (prev_rma_d * (rsi_len - 1)) float rev_price = req_up > 0 ? prev_c + req_up : (req_down > 0 ? prev_c - req_down : prev_c) rev_price

2. It filters a Lower Timeframe (LTF) Volume Profile using LTF RSI data, discarding neutral volume and coloring only the specific price nodes where momentum reached extreme anomalies.
Pine Script®
// RSI Anomaly Matrix & Peak Retention Logic bool is_significant = (intensity * 100.0) >= vol_threshold color base_c = color_prof_neutral if is_significant if rsi_color_mode == "Peak Retention" if max_rsi >= rsi_ob and min_rsi <= rsi_os base_c := (max_rsi - 50.0) > (50.0 - min_rsi) ? color_ob : color_os else if max_rsi >= rsi_ob base_c := color_ob else if min_rsi <= rsi_os base_c := color_os


■2. Core Mechanism 1: Reverse RSI Projection (The Math)
Instead of tracking an oscillator bounded between 0 and 100, this script mathematically reverses J. Welles Wilder Jr.'s Smoothed Moving Average (RMA) formula.
快照
To calculate the exact closing price required on the next bar to achieve a specific Target RSI (e.g., 70 or 30), the script uses the following logic:
RS = Target_RSI / (100 - Target_RSI)
Required_Up =
(RS * Prev_RMA_D * (Length - 1)) - (Prev_RMA_U * (Length - 1))
Required_Down =
(Prev_RMA_U * (Length - 1) / RS) - (Prev_RMA_D * (Length - 1))


It plots these calculated prices as horizontal projection lines, allowing traders to evaluate momentum limits directly on the price action.

■3. Core Mechanism 2: RSI Anomaly Liquidity Matrix
Momentum limits require structural backing to be reliable. This engine aggregates LTF data to generate a filtered Volume Profile.
・Dynamic Sessions: Generates profiles based on Daily, Weekly, Monthly, or Custom Market Sessions (Defaults are set to UTC for Oceania, Asia, London, and NY).
・RSI Anomaly Coloring: Instead of plotting standard volume, the script calculates the average LTF RSI for each price node. It only applies color to nodes where the average momentum reached extreme Overbought or Oversold levels, keeping the rest of the profile neutral. This eliminates visual noise and isolates true areas of structural exhaustion.
・Point of Control (POC): Automatically extracts and highlights the price level with the highest liquidity concentration.

■4. Configuration & Parameters
・Profile Generation Mode: Determines time boundaries. Day traders can use Custom Sessions (UTC), while swing traders benefit from Daily/Weekly structures.
・Liquidity Data Source: While 'Volume' is the standard input, 'Price Delta' is provided as a proxy to ensure the profile functions on assets lacking raw volume data (e.g., certain Forex feeds).
・Max LTF Samples per Bar: Limits how many LTF candles are processed per higher timeframe candle to optimize performance and prevent calculation limits.
・RSI Coloring Mode: Controls sensitivity. "Volume-Weighted Average" is mathematically strict but colors may neutralize over time. "Peak Retention" ensures that if a price node hits an RSI extreme at any point during the session, it permanently retains that warning color, preventing dilution.

快照

快照

・Significance Threshold & Hide Weak Nodes: Filters out price nodes that lack sufficient volume (e.g., under 30% of the POC volume). Graying out or hiding low-volume nodes removes noise.
・POC Proximity Filter: Fades the RSI projection lines if no historical POC is nearby, utilizing ATR to define a dynamic "safe zone." Momentum extremes without structural support are prone to false breakouts.

■5. Usage & Mindset
・Best Suited For: High-liquidity instruments (Major Forex, Indices, Large-cap Crypto) on 15M to 1H charts.
・Execution: Do not enter blindly when price hits the RSI projection line. Wait for confluence: "Is this momentum extreme backed by a colored, structural POC wall?" Use the confluence zone to define strict Stop Loss levels.

■Disclaimer
This script is a quantitative analysis tool designed for educational purposes to visualize mathematical momentum and liquidity data. It does not guarantee future profits and is not intended as a signal service. Always employ strict risk management and conduct comprehensive market analysis.



[日本語訳 / Japanese Translation]

Institutional Momentum & Liquidity Matrix

概要

本ツールは、価格モメンタムと市場流動性の構造的差異を統合的に分析するための定量分析スイートです。「RSIの現在値」に依存するアプローチから脱却し、「特定のRSI水準に到達するために必要な要請価格」を逆算してチャート上に直接可視化します。さらに、RSI異常値を反映した流動性マトリックスを展開し、構造的な枯渇点を浮き彫りにします。

1. 独創性と設計思想
RSIと出来高プロファイルは広く普及していますが、単体での使用はダマシを誘発します。本スクリプトはこれらを数学的に統合した点に独創性があります。
1. Wilderの平滑化移動平均(RMA)を代数的に逆算し、モメンタムの限界値を価格スケール上に直接投影します。
2. 下位足(LTF)の出来高プロファイルをLTFのRSIデータでフィルタリングし、極端な異常値(過熱感)を記録した価格帯のみを色付けして視覚化します。

2. コア・メカニズム1: 逆算RSIプロジェクション(計算根拠)
オシレーターを監視するのではなく、RMAの計算式を逆算します。次期のローソク足で指定のRSI極値(例: 70または30)に到達するための終値を、以下のロジックで算出します。
RS = 目標RSI / (100 - 目標RSI)
必要な上昇幅 =
(RS * 前回のRMA下落幅 * (期間 - 1)) - (前回のRMA上昇幅 * (期間 - 1))
必要な下落幅 =
(前回のRMA上昇幅 * (期間 - 1) / RS) - (前回のRMA下落幅 * (期間 - 1))


算出された価格を水平線として描画し、価格アクション上でモメンタムの限界を評価可能にします。

3. コア・メカニズム2: RSI異常値・流動性マトリックス
LTFデータを集計し、高度なフィルターを備えた価格帯別出来高を生成します。
・動的セッション: 日次、週次、月次、または特定の市場セッションに対応(※セッション時間はすべてUTC基準です)。
・RSI異常値カラーリング: 各価格帯の平均LTF RSIを算出し、買われすぎ/売られすぎの極限領域に達した価格帯のみを色付けします。通常の価格帯をニュートラルカラーに保つことで視覚的ノイズを排除します。
・Point of Control (POC): 最大流動性が集中する価格帯を自動抽出し、強力なレジサポとしてハイライトします。

4. パラメーター設定
・Generation Mode (生成モード): デイトレーダーには特定の市場セッションが、スイングトレーダーには日次・週次の構造が適しています。
・Liquidity Data Source (流動性データ): 「出来高」を基本としますが、出来高データがない銘柄(一部のFX等)でも機能するよう、「価格変動幅(Price Delta)」を選択可能です。
・Max LTF Samples per Bar (最大LTF参照数): 上位足1本に対して参照する下位足の本数を制限し、計算処理を最適化します。
・RSI Coloring Mode (カラーリング感度・保持): プロファイルの色付け基準を選択します。「出来高加重平均 (Volume-Weighted)」は厳格ですが、その後の通常取引によって色が中和される性質があります。「ピーク保持 (Peak Retention)」を選択すると、セッション中に一度でもRSI異常値を記録した価格帯は、その極値カラーを履歴として保持し続けます(高感度モード)。
・Significance Threshold (有意性閾値): POCに対して一定割合に満たない価格帯をグレーアウトまたは非表示にし、真の壁のみを残します。
・POC Proximity Filter (近接フィルター): 過去のPOCが近くにない場合、プロジェクションラインをフェードアウトさせます。構造的な支持を持たない極値はダマシになりやすいため、ATRを利用したリスク管理レイヤーとして機能します。

5. 使い方と環境
・得意な環境: 流動性の高いメジャー通貨ペア、主要株価指数、大型暗号資産の15分足〜1時間足。
・思考プロセス: 価格がRSIプロジェクションに到達したからといって盲目的にエントリーせず、「その極値の背後に、色付けされたPOCの壁が存在するか」を確認してください。コンフルエンス領域を基準に、厳格な損切りを設定してください。

免責事項
本スクリプトは、数学的モメンタムおよび流動性データを可視化し、市場構造の理解を深めるための教育用ツールです。将来の利益を保証するものではなく、シグナル配信ツールではありません。常に適切なリスク管理と独自の市場分析を行ってください。
發行說明
1. Enhanced Noise Filtration in "Peak Retention" Mode
[Before] Prone to false RSI spikes caused by momentary wicks and institutional stop hunts (liquidity sweeps).
[After] Integrates a strict Average RSI Synchronization Filter. Instead of overreacting to split-second noise, the matrix now strictly highlights "true momentum nodes" backed by actual volume and sustained price action.
2. Heightened Sensitivity & Customization for "Volume-Weighted" Mode
Volume-weighted calculations naturally tend to aggressively converge toward the median. To counter this, a new "VWAP RSI Sensitivity (Compression)" input parameter has been introduced.
Default Value (0.6): Operates with optimal sensitivity to successfully unmask "hidden anomaly zones"—areas where institutions quietly accumulate orders under the radar.
Adjustable Range (0.1 - 1.0): Allows you to perfectly calibrate the indicator's responsiveness to match specific market volatilities (e.g., highly volatile crypto assets vs. ranging forex pairs).
發行說明
Release Notes
Update: Performance Optimization & Core Logic Refinement
Dear Traders,
First and foremost, I would like to express my deepest gratitude for your continuous support, constructive feedback, and the many "likes" this indicator has received. Your engagement is the driving force behind these improvements.
I must also offer my sincere apologies for the inconveniences caused by the previous version, specifically the excessive charting lag and the unstable color inversion of the profiles.
In this major update, the internal architecture has been entirely restructured to deliver a flawless and highly reliable experience.
Ultimate Performance Optimization: The Reverse RSI calculation engine has been completely overhauled. By restricting complex computations strictly to confirmed bars, the script's resource consumption has been drastically reduced. You will now experience smooth, lag-free charting under any market condition.
Pure Anomaly Visualization: Embracing a philosophy of subtraction aesthetics, I have stripped away the overly complex volume-weighted neutral filters. The indicator no longer suffers from unintended signal inversions caused by minor market noise. It now focuses purely on capturing and visualizing genuine liquidity anomalies and extreme market states.
Strict Simulation Integrity: The repainting issue within the internal risk projection (Easter egg) feature has been permanently resolved. Entry and exit triggers are now strictly locked to confirmed price action, ensuring that all historical signals remain absolute and provide highly dependable data for your backtesting.
By stripping away the unnecessary, this tool now highlights the true footprint of institutional liquidity with absolute clarity. Thank you for your continued trust, and I hope this refined matrix serves your trading strategies well.
リリースノート
アップデート:動作の軽量化およびコアロジックの純粋化
トレーダーの皆様へ
日頃より本インジケーターをご愛顧いただき、また多くの「いいね」や温かいご支援を賜り、心より御礼申し上げます。皆様からのフィードバックが、本ツールの更なる進化への大きな原動力となっております。
同時に、前バージョンにおきまして、チャート動作の著しい遅延や、プロファイルの色(シグナル)が不安定に反転してしまう不具合により、皆様に多大なるご不便をおかけしましたことを深くお詫び申し上げます。
今回のメジャーアップデートでは、皆様により快適かつ正確な環境をご提供するため、内部ロジックを根本から再構築いたしました。
圧倒的なパフォーマンスの向上: RSI逆算エンジンの処理を最適化し、ローソク足が確定した瞬間にのみ計算を実行するよう仕様を変更いたしました。これによりPCへの負荷が劇的に軽減され、いかなる相場環境でも遅延のない極めてスムーズな動作を実現しています。
シグナル抽出の純粋化: 余計な要素を削ぎ落とす「引き算の美学」に基づき、過剰に複雑化していた中和フィルターを完全に撤廃いたしました。わずかなノイズによる意図しない色の反転を防ぎ、相場に刻まれた真の流動性の偏り(アノマリー)のみを、純粋かつ鮮明に可視化します。
シミュレーションの厳格化: 内部のリスクプロジェクション(検証用シグナル)において発生していたリペイント現象を完全に解消いたしました。エントリーおよび決済の判定を厳格化し、一度点灯したシグナルは決してブレることなく、極めて信頼性の高い検証データとしてご活用いただけます。
不要なものを削ぎ落とし、市場の真の足跡のみを捉える洗練されたツールへと生まれ変わりました。新しくなったマトリックスが、皆様のトレードの一助となれば幸いです。今後とも変わらぬご愛顧を賜りますようお願い申し上げます。

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。