Pair Trading Correlation Matrix Dashboard
Single-canvas statistical-arbitrage workstation combining an N x N correlation, Engle-Granger cointegration and live Z-score matrix with OLS/Kalman Spread Studio, atomic 2-leg beta-neutral execution and an account-wide duplicate-risk radar.
Key features
- Interactive N x N multi-asset heatmap (up to 12 symbols / 66 pairs) with one-click CORR (Pearson/Spearman + regime drift), COINT (Engle-Granger ADF MacKinnon p-value) and live Z-SCR modes.
- 5 built-in baskets (FX Majors, Multi-Asset, FX Crosses, Metals+Indices+Oil+Crypto, Custom CSV) with automatic broker suffix and cross-asset alias resolution.
- Ranked all-pairs statistical-arbitrage scanner computing OLS and adaptive Kalman filter hedge ratios, Ornstein-Uhlenbeck Half-Life, Hurst Exponent, live Z-score and 0-100 Quality Score.
- Dual-chart Spread Studio with beta-adjusted normalized price overlay, Z-score bands (+/-Entry, +/-Exit, +/-Stop) and pre-trade lot, hedge-drift %, margin, spread-cost and swap preview.
- Atomic one-click 2-leg beta-neutral execution with leg-safety rollback if Leg B fails, plus optional semi-auto exit manager (Z-Exit, Z-Stop, Money TP/SL, Half-Life time stop, cointegration break and orphan guard).
- Account-wide Duplicate-Risk & Natural-Hedge Radar (scans manual trades and other EAs), Effective Independent Bets (N_eff), net currency exposure bars, single-canvas CCanvas UI (Dark & Light themes, 100%-200% DPI), alerts and CSV export.
Video
Demo and walk-through of Pair Trading Correlation Matrix Dashboard.
Full description
The complete feature description, as published on the MQL5 Market.
Pair Trading Correlation Matrix Dashboard is a professional MetaTrader 5 statistical-arbitrage workstation, multi-asset correlation & cointegration matrix, and one-click beta-neutral pair execution utility — rendered onto a single high-DPI canvas with zero chart-object lag.
Most correlation tables show static Pearson coefficients only, leaving traders exposed to trending pairs that drift apart permanently. This dashboard combines an interactive N × N multi-asset heatmap (up to 12 symbols across FX, Metals, Indices, Energy, and Crypto) with live Engle-Granger ADF cointegration p-values, Ornstein-Uhlenbeck Half-Life, Hurst Exponent, OLS & Kalman hedge ratios, dual-chart Spread Studio, atomic one-click 2-leg execution with leg-safety rollback, and an account-wide duplicate-risk & currency exposure radar.
1. Interactive N × N Multi-Asset Matrix (Matrix Tab)
- 3 Live Heatmap Modes (one-click switch):
- CORR — Rolling Pearson or Spearman Rank log-return correlation (−1.00 to +1.00) with recent-vs-full correlation regime drift (Δr) indicators.
- COINT — Engle-Granger ADF MacKinnon p-value heatmap, instantly separating genuinely mean-reverting cointegrated spreads from false correlation traps.
- Z-SCR — Live beta-neutral Spread Z-Score across all N×(N−1)/2 pairs simultaneously, highlighting extreme divergences (±Entry) at a glance.
- Multi-Asset Baskets & Auto Symbol Resolution: 5 built-in presets (FX Majors, Multi-Asset, FX Crosses, Metals+Indices+Oil+Crypto, and Custom CSV up to 12 symbols). Automatically resolves broker suffixes (
.a,.r,.raw,m,Cash, etc.) and index/commodity aliases at runtime. - Instant Controls: Switch timeframe (
M15 / M30 / H1 / H4 / D1), lookback window (60 / 120 / 200 / 300bars), correlation formula (Pearson / Spearman), and hedge model (OLS / Kalman) directly on the dashboard. - Click-to-Inspect: Click any matrix cell to load that pair into the Quick Inspector with KPI tiles, live Z-score sparkline, sizing preview, and one-click trade buttons; click again to open the full Spread Studio.
2. Ranked All-Pairs Stat-Arb Scanner (Scanner Tab)
- Continuously evaluates every unordered pair in your basket (up to 66 pairs simultaneously) on bar close and throttled timer intervals — zero tick-spam CPU freezes.
- Displays Return Correlation & Drift, Engle-Granger p-Value, OLS / Kalman Beta, Half-Life (bars), Hurst Exponent (H), Live Spread Z-Score, 0–100 Pair Quality Score, and actionable signal badges (
LONG SPR,SHORT SPR,WATCH,COINT). - One-click sorting by
|Z|,Score,p-Val,|Corr|, orHalf-Life, plus aCOINT: ON/ALLfilter and pagination.
3. Dual-Chart Spread Studio & Beta-Neutral Execution (Spread Tab)
- Normalized Beta-Adjusted Price Overlay: Plots Leg A against Beta-scaled Leg B (indexed to 100) with shaded divergence fill and live percentage gap.
- Spread Z-Score Curve: Plots the rolling Z-score with shaded entry bands (
±Z_Entry), mean-reversion exit targets (±Z_Exit), hard stop boundaries (±Z_Stop), and a live right-axis Z marker. - Complete Pre-Trade Sizing Preview: Choose Risk % at Z-Stop, Fixed Leg A Lot, or Equal USD Notional with live
− / +steppers. Before clicking, see exact Leg A & Leg B lots, Hedge Rounding Drift %, Required Margin & % Equity, 2-Leg Bid/Ask Cost in Z-sigma, and Net Daily Swap. - Atomic One-Click 2-Leg Execution with Leg-Safety Rollback: Verifies trading sessions, combined free margin, broker volume limits, and filling modes for both legs before sending. Automatically handles both positive and negative beta hedge directions. If Leg B fails after retries, Leg A is rolled back immediately so you are never left with an accidental unhedged directional position.
- Optional Semi-Auto Exit Manager & Orphan Guard: Toggle
AUTO EXITon or off anytime to monitor dashboard-opened pairs for Mean-Reversion Z-Exit, Z-Stop, Money TP/SL, Half-Life / Max-Bar Time Stop, Cointegration Break exit, and Orphan-Leg cleanup. - One-Click Chart Launch: Jump directly to Chart A or Chart B, or swap legs A/B instantly.
4. Open Pair Manager, Duplicate-Risk Radar & Currency Exposure (Risk Tab)
- Managed Open Pair Baskets: Tracks every dashboard pair across terminal restarts via magic number and pair ID tags, showing Leg A/B lots, Entry Z → Live Z, bars held, swap, net P/L, per-pair
CLOSE, and emergencyCLOSE ALL. - Account-Wide Duplicate-Risk Radar: Scans every open position on your account (manual trades and other EAs) against the live correlation matrix, flagging DUPLICATE RISK (correlated same-direction stacking) and NATURAL HEDGE offsets alongside Effective Independent Bets (N_eff) and an overall 0–100 Correlation Risk Score.
- Net Currency Exposure Bars: Horizontal diverging bar chart showing aggregate signed notional exposure per currency/asset (
USD,EUR,GBP,JPY,XAU, indices, etc.) so hidden USD concentration is immediately visible.
5. Institutional Single-Canvas UI, Alerts & CSV Export
- Zero Chart-Object Bloat: Entire workstation renders onto 1 single
CCanvasbitmap object. CleanOnDeinitremoves 100% of objects. - Adaptive Themes & High-DPI Scaling: One-click Dark (Obsidian Slate & Emerald Amber) and Light (Porcelain Ivory & Cobalt) themes, automatic or custom 100%–200% DPI scaling, movable by dragging the header bar, and collapsible into a compact live P/L HUD bar.
- Alerts & Quant Export: Optional Popup, Mobile Push, and Sound alerts for cointegrated Z-score signals, correlation regime shifts, and duplicate-risk concentration. One-click
CSVexport saves the full N × N matrix and ranked scanner ledger toMQL5/Files/. - Free Strategy Tester Demo: Includes a Strategy Tester demo mode (active inside MT5 Strategy Tester only; live and demo charts remain strictly under manual/semi-auto control) so you can inspect the statistical engine and pair execution before purchasing.
Note: This utility is an analytical dashboard and discretionary/semi-automated trade execution cockpit. Statistical cointegration and mean-reversion metrics describe historical price relationships and do not guarantee future performance. Always verify broker contract specifications, margin requirements, and risk settings on a demo account before live trading.
Quick start
From purchase to a running utility in a few minutes. Details in the install guide.
- Get the utility on the MQL5 Market page: buy, rent, download the free demo, or install it from the Market tab in MetaTrader.
- Most utilities run as Expert Advisors: find them in the Navigator under Expert Advisors › Market and drag one onto a chart.
- If the tool places or manages orders, tick Allow Algo Trading and switch on the Algo Trading button. If it sends web messages, add the address named in its description under Tools › Options › Expert Advisors › Allow WebRequest.
- Try it on a demo account first.
Signals and statistics describe past behaviour on historical data and are not a promise of future results. Trading involves risk. See the risk disclaimer.
More utilities
Trade Assistant Risk Calculator MT5
Trade Assistant Risk Calculator is an all-in-one floating trading panel Expert Advisor for MetaTrader 5, built for professional manual traders.
EA Robustness Lab
EA Robustness Lab tells you whether an Expert Advisor's results are robust or overfitted.
Bar Replay Simulator
Bar Replay Simulator turns any MetaTrader 5 chart into a trading practice room.
Custom Charts Pro Seconds Renko Range
Custom Charts Pro builds seconds charts (S1 … S3600, any value), Renko, Range bars and Tick charts as real MetaTrader 5 custom symbols, from your broker's real ticks.







