OPEN-SOURCE SCRIPT

Premium & Discount Matrix

426
1. Dynamic Intraday Dealing Range
The core of the PD Matrix is the "dealing range." The script calculates this by finding the absolute highest high and lowest low of the current daily session:

It automatically detects when a new day begins.
As the day progresses and price creates new highs or lows, the script dynamically updates the top and bottom boundaries in real-time.

2. Matrix Box & Equilibrium
Once the dealing range is established, it draws the matrix components:

The Box: It draws a single, fully transparent rectangle around the entire daily range. The background is completely clear so it doesn't obstruct your candlesticks, and only the outer border is visible.
Equilibrium (50%): It automatically calculates the exact mathematical midpoint of the daily high and low. It then draws a dashed line straight through the middle of the box to represent the 50% Equilibrium level.

3. Smart Market Labeling
To make the zones instantly readable, the script places three floating text labels neatly to the right of your current live candle. These labels move with the price action:

Premium (Red): Positioned in the upper half (above 50%). According to ICT concepts, this is expensive pricing where institutional algorithms seek to distribute (sell short).
Eq (50%) (Gray): Points directly to the dashed equilibrium line, representing fair value.
Discount (Green): Positioned in the lower half (below 50%). This is cheap pricing where institutional algorithms seek to accumulate (buy long).

4. Customization & Performance
Like the previous script, this is highly optimized for TradingView. It uses a single dynamic box, a single line, and three labels that constantly update on the very last bar, preventing your chart from being cluttered with hundreds of historical drawings.

You can fully customize the colors of the box border, the equilibrium line, and all three text labels directly from the indicator settings!

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.