OPEN-SOURCE SCRIPT
SPX Multi-Basis Dashboard[VT]

Here is a professional and comprehensive English description tailored for your TradingView script. You can use this for the script's publication description or as documentation.
------------------------------
## SPX Multi-Basis Dashboard## Overview
SPX Multi-Basis Dashboard is a high-performance institutional-grade market arbitrage tool designed for Pine Script v6. It calculates and tracks the real-time basis (price discrepancies) among major S&P 500 tracking instruments: SPX, SPY, E-mini Futures (ES!), and Micro E-mini Futures (MES!).
To provide reliable structural market insights and eliminate micro-second price flickering, the dashboard features a 5-minute discrete time-lock mechanism that samples and freezes the basis data at synchronized 5-minute intervals.
------------------------------
## Key Features
* Strict Non-Rounding Decimal Truncation: Built with custom mathematical routines (math.floor) that strictly truncate all market prices and basis values to 2 decimal places without rounding. This preserves the raw precision required for genuine arbitrage analysis.
* Synchronized 5-Minute Time-Lock: Locks the basis computations every 5 minutes to Filter out minor intraday noise and present clear structural premiums or discounts.
* Explicit Positive/Negative Sign Markings: Automatically appends literal + or - symbols prefixing the basis column (+12.45 / -3.10) for instantaneous visibility of premium/discount states.
* Multi-Symbol Price Cross-Reference: Features a 3-column matrix layouts displaying the tracking Formula, real-time Market Prices, and the 5m Time-Locked Basis side by side.
* Premium Transparent Light Theme: Tailor-made for White/Light chart setups. It features a modern, ultra-clean graphite overlay with variable opacity that naturally blends into your chart workspace without blocking background candlesticks.
* Bulletproof Fault Tolerance: Embedded with v6 native compilation guardrails (ignore_invalid_symbol=true) and strict market cap divergence filters to handle contract rollovers smoothly without breaking or throwing runtime errors.
------------------------------
## Column Layout Guide
1. Formula: Displays the mathematical alignment rule used for the calculation (e.g., SPX - (SPY × 10) to neutralize the SPY ETF 1:10 split ratio).
2. Market Price: Live streaming quotes fetched directly via unified security channels. (Displays SPX / SPY coupled matrix on row 1, and underlying front-month continuous contract prices for ES! and MES! on rows 2 and 3).
3. 5m Basis: The synchronized basis reading marked in Teal Green for positive values (Premium) and Wine Red for negative values (Discount).
------------------------------
## Configuration Inputs
* Update Interval (Mins): Customize the basis sampling frequency (Defaults to 5 minutes).
* Dashboard Position: Dynamically anchors the matrix across any corner of your chart workspace (Top Right, Bottom Right, Top Left, Bottom Left).
------------------------------
## SPX Multi-Basis Dashboard## Overview
SPX Multi-Basis Dashboard is a high-performance institutional-grade market arbitrage tool designed for Pine Script v6. It calculates and tracks the real-time basis (price discrepancies) among major S&P 500 tracking instruments: SPX, SPY, E-mini Futures (ES!), and Micro E-mini Futures (MES!).
To provide reliable structural market insights and eliminate micro-second price flickering, the dashboard features a 5-minute discrete time-lock mechanism that samples and freezes the basis data at synchronized 5-minute intervals.
------------------------------
## Key Features
* Strict Non-Rounding Decimal Truncation: Built with custom mathematical routines (math.floor) that strictly truncate all market prices and basis values to 2 decimal places without rounding. This preserves the raw precision required for genuine arbitrage analysis.
* Synchronized 5-Minute Time-Lock: Locks the basis computations every 5 minutes to Filter out minor intraday noise and present clear structural premiums or discounts.
* Explicit Positive/Negative Sign Markings: Automatically appends literal + or - symbols prefixing the basis column (+12.45 / -3.10) for instantaneous visibility of premium/discount states.
* Multi-Symbol Price Cross-Reference: Features a 3-column matrix layouts displaying the tracking Formula, real-time Market Prices, and the 5m Time-Locked Basis side by side.
* Premium Transparent Light Theme: Tailor-made for White/Light chart setups. It features a modern, ultra-clean graphite overlay with variable opacity that naturally blends into your chart workspace without blocking background candlesticks.
* Bulletproof Fault Tolerance: Embedded with v6 native compilation guardrails (ignore_invalid_symbol=true) and strict market cap divergence filters to handle contract rollovers smoothly without breaking or throwing runtime errors.
------------------------------
## Column Layout Guide
1. Formula: Displays the mathematical alignment rule used for the calculation (e.g., SPX - (SPY × 10) to neutralize the SPY ETF 1:10 split ratio).
2. Market Price: Live streaming quotes fetched directly via unified security channels. (Displays SPX / SPY coupled matrix on row 1, and underlying front-month continuous contract prices for ES! and MES! on rows 2 and 3).
3. 5m Basis: The synchronized basis reading marked in Teal Green for positive values (Premium) and Wine Red for negative values (Discount).
------------------------------
## Configuration Inputs
* Update Interval (Mins): Customize the basis sampling frequency (Defaults to 5 minutes).
* Dashboard Position: Dynamically anchors the matrix across any corner of your chart workspace (Top Right, Bottom Right, Top Left, Bottom Left).
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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.