Prices go up Friday 27 Nov · 00:00 New York 5d 00:34:00

Open-source

Premium and Discount Pivot Matrix

Premium and Discount Pivot Matrix is an advanced market-structure terminal engineered for TradingView. It maps macroeconomic structural equilibrium by tracking histori...

Premium and Discount Pivot Matrix preview
Published Aug 7, 2026
4142,061

What this TradingView script does

Premium and Discount Pivot Matrix is an advanced market-structure terminal engineered for TradingView. It maps macroeconomic structural equilibrium by tracking historical price extremes and calculating accurate institutional auction zones.

Instead of printing static linear channels, this framework uses an active multi-pivot state matrix to calculate premium ceiling and discount floor boundaries. It pairs these levels with a real-time 100-Bin Volume Profile Matrix plotted directly at the leading edge of the chart, providing immediate clarity on volume distribution relative to the market's fair-value equilibrium.

NSE:NIFTY

BINANCE:BTCUSDT

🔵 CHANNEL CALCULATION METHODOLOGY The central core of the indicator relies on a multi-layered geometric calculation engine to establish its tracking bands. The engine follows a distinct three-step sequence to construct the structural matrix:

1. Multi-Pivot Array Extraction Engine

- Asymmetric Window Scanning Nodes: The engine scans the chart for structural price peaks and troughs using an adjustable lookback window (Pivot Left/Right Bars). For a pivot to be verified, it must be the absolute highest or lowest value within that specified bar radius.

- FIFO Array Storage Matrix: When a high pivot is logged, it is pushed into the highPivots array; low pivots are funneled into the lowPivots array. The script features memory guardrails (Max Pivots to Track) that automatically shift old elements out of memory, limiting array depth to prevent memory allocation drag.

// Manage Arrays via FIFO (First-In, First-Out) Storage Architecture if not na(pHi) array.push(highPivots, pHi) if array.size(highPivots) > arraySize array.shift(highPivots)

if not na(pLo) array.push(lowPivots, pLo) if array.size(lowPivots) > arraySize array.shift(lowPivots)

How traders can use it

Use Premium and Discount Pivot Matrix as a chart context layer inside TradingView: read the structure it highlights, compare it with your market bias, and let the script narrow which moves deserve attention.

The strongest workflow is to combine the script with higher timeframe structure, volume context, and a repeatable execution plan instead of treating any single label as a standalone trade.

Ready to level up your trading?

Get advanced indicators, backtesting and the BigBeluga community in one plan.

Get Access