OPEN-SOURCE SCRIPT
已更新 PD Arrays Matrix

This script is arguably the most comprehensive script in this workspace. It acts as an algorithmic footprint scanner, actively mapping the entire spectrum of ICT "Premium/Discount Arrays" on your chart in real-time.
Because charting all these footprint concepts can get incredibly cluttered, it features a built-in memory management system, a Lookback Period optimizer (to only track recent data), and toggle switches for every single array type in the settings menu.
Here is exactly what the script detects, draws, and manages:
1. Fair Value Gaps (FVGs) & Consequent Encroachment (CE)
BISI (Buyside Imbalance Sellside Inefficiency): A Bullish FVG. Drawn as a green box when a massive up-move leaves a 3-candle gap.
SIBI (Sellside Imbalance Buyside Inefficiency): A Bearish FVG. Drawn as a red box during a massive down-move.
CE (Consequent Encroachment): It automatically calculates and draws a dotted midline perfectly through the 50% equilibrium mark of every active FVG, which algos use for precise mitigation.
2. Inversion FVGs (IFVG)
The script actively monitors the life-cycle of every FVG. If a Bullish FVG fails to support price and a candle closes completely below it, the script intelligently flips its polarity.
It turns into a Bearish Resistance zone (colored red/gray) labeled IFVG, extending into the future.
3. Balanced Price Ranges (BPR)
A highly sensitive algorithmic signature. If the script detects that a new Bearish FVG has formed and perfectly overlaps the price range of an older Bullish FVG, it highlights that specific overlapping zone in yellow. This acts as a massive magnet/rejection zone for future price action.
4. Volume Imbalance (VI)
Detects microscopic inefficiencies. If two consecutive candles gap up or down so heavily that their bodies do not overlap at all, but their wicks do touch, the script draws a small purple VI zone between the bodies.
5. Order Blocks (OB)
To filter out low-probability order blocks, the script mathematically enforces the Displacement Rule. It will only flag an institutional down-candle (+OB) or up-candle (-OB) if it immediately precedes a move impulsive enough to leave behind an FVG.
6. Breaker Blocks (+BRK/-BRK) & Mitigation Blocks (MB)
The script monitors the life-cycle of Order Blocks! When an Order Block fails and price breaks aggressively through it, the algorithm checks the previous swing structure:
Did price sweep liquidity (a higher high / lower low) before breaking the OB? If yes, it flips the failed OB into a Breaker Block, turning support into resistance.
Did price fail to sweep liquidity? If yes, it flips it into a Mitigation Block.
7. Rejection Blocks
It scans the chart for unusually long institutional wicks (specifically, wicks that are more than double the size of the candle body and statistically significant relative to the ATR).
When found, it draws a block from the open/close of the candle body out to the extreme tip of the wick, highlighting where institutional accumulation or distribution took place off-screen.
Because charting all these footprint concepts can get incredibly cluttered, it features a built-in memory management system, a Lookback Period optimizer (to only track recent data), and toggle switches for every single array type in the settings menu.
Here is exactly what the script detects, draws, and manages:
1. Fair Value Gaps (FVGs) & Consequent Encroachment (CE)
BISI (Buyside Imbalance Sellside Inefficiency): A Bullish FVG. Drawn as a green box when a massive up-move leaves a 3-candle gap.
SIBI (Sellside Imbalance Buyside Inefficiency): A Bearish FVG. Drawn as a red box during a massive down-move.
CE (Consequent Encroachment): It automatically calculates and draws a dotted midline perfectly through the 50% equilibrium mark of every active FVG, which algos use for precise mitigation.
2. Inversion FVGs (IFVG)
The script actively monitors the life-cycle of every FVG. If a Bullish FVG fails to support price and a candle closes completely below it, the script intelligently flips its polarity.
It turns into a Bearish Resistance zone (colored red/gray) labeled IFVG, extending into the future.
3. Balanced Price Ranges (BPR)
A highly sensitive algorithmic signature. If the script detects that a new Bearish FVG has formed and perfectly overlaps the price range of an older Bullish FVG, it highlights that specific overlapping zone in yellow. This acts as a massive magnet/rejection zone for future price action.
4. Volume Imbalance (VI)
Detects microscopic inefficiencies. If two consecutive candles gap up or down so heavily that their bodies do not overlap at all, but their wicks do touch, the script draws a small purple VI zone between the bodies.
5. Order Blocks (OB)
To filter out low-probability order blocks, the script mathematically enforces the Displacement Rule. It will only flag an institutional down-candle (+OB) or up-candle (-OB) if it immediately precedes a move impulsive enough to leave behind an FVG.
6. Breaker Blocks (+BRK/-BRK) & Mitigation Blocks (MB)
The script monitors the life-cycle of Order Blocks! When an Order Block fails and price breaks aggressively through it, the algorithm checks the previous swing structure:
Did price sweep liquidity (a higher high / lower low) before breaking the OB? If yes, it flips the failed OB into a Breaker Block, turning support into resistance.
Did price fail to sweep liquidity? If yes, it flips it into a Mitigation Block.
7. Rejection Blocks
It scans the chart for unusually long institutional wicks (specifically, wicks that are more than double the size of the candle body and statistically significant relative to the ATR).
When found, it draws a block from the open/close of the candle body out to the extreme tip of the wick, highlighting where institutional accumulation or distribution took place off-screen.
發行說明
Updated customization for every each elements and feature for PD Array Matrix開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。