Description
Short Description: Displays a real-time correlation matrix between selected instruments using Pearson correlation coefficient calculation.
Overview
The Correlation Matrix is a modern risk management indicator for MetaTrader 4 and MetaTrader 5. It displays a real-time Pearson correlation matrix for up to 10 selected instruments, preventing traders from accidentally doubling portfolio risk on highly correlated currency pairs.
Key Features
- Real-Time Pearson Matrix: Calculates live correlation values ranging from -1.00 to +1.00.
- Color-Coded Heatmap: Displays strong positive correlation (Dark Green), strong negative correlation (Dark Red), and neutral (White/Gray).
- Customizable Lookback: Adjustable calculation bar period (e.g. 50 to 500 bars).
- Extreme Correlation Alerts: Popups, push notifications, and webhooks when pair correlation exceeds 0.90 or -0.90.
How It Works
1. Price Return Calculation: Fetches price series for configured symbols and computes logarithmic returns.
2. Covariance & Variance Matrix: Calculates covariance between all symbol pairs.
3. Grid Rendering: Displays the correlation grid directly on the chart panel.
Trading/Indicator Logic
- Correlation Coefficient ($r$): $r =
rac{sum (X – ar{X})(Y – ar{Y})}{sqrt{sum (X – ar{X})^2 sum (Y – ar{Y})^2}}$
- Green Cell: $r ge +0.70$ (Strong Positive Correlation)
- Red Cell: $r le -0.70$ (Strong Negative Correlation)
Supported Markets
- Forex, Gold, Silver, Indices, Crypto
Recommended Timeframes
- H1, H4, D1
Recommended Symbols
- EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, XAUUSD
Main Settings
- Instruments List: Comma-separated symbol list.
- Lookback Period (100): Bars used for calculation.
- Alert Threshold (0.90): Correlation extreme alert trigger.
Installation
1. Copy compiled `.ex4` or `.ex5` to `MQL4/Indicators` or `MQL5/Indicators`.
2. Refresh Navigator and drag onto chart.
How To Use
1. Check matrix before placing new trades to avoid opening duplicate correlated exposure.
Who Is It For
- Portfolio & Hedging Traders: Requiring strict risk controls across multiple assets.
What’s Included
- `.EX4` and `.EX5` Compiled Files + Manual + Lifetime Support.
Updates & Support
Lifetime updates included.
Risk Disclaimer
Trading involves financial risk. Test on demo prior to live deployment.
FAQ
Q: Can I use this for Indices and Gold?
A: Yes, any symbol available in Market Watch can be included.





Reviews
There are no reviews yet.