Topics: metatrader5, mql5, correlation-matrix, expert-advisor, mql4, metatrader, forex-trading, risk-management, data-visualization, portfolio-management, currency-strength, correlation-analysis, portfolio-risk, mt4, mt5, trading-bot, mt5-correlation-matrix, currency-strength-meter, fx-portfolio-heatmap
Portfolio correlation and multi-symbol risk monitor for MT5 / MT4 traders. The project measures live correlations between open positions, currency baskets, and watchlist symbols, exposing hidden exposure, redundant trades, and unintended hedges across an entire forex portfolio.
Real-time correlation matrix, currency strength meter, and basket exposure heatmap, built to keep multi-pair traders out of accidental triple positions.
Opening three "different" trades that all move together is just one big trade at triple risk.
This project gives you:
- A live correlation matrix across watched pairs
- Currency-level strength scoring
- Aggregated portfolio beta and risk exposure
Portfolio Correlation MT5/MT4 computes statistical relationships across symbols and projects them as actionable risk metrics.
| Module | Description |
|---|---|
| Correlation Engine | Rolling Pearson on N-bar returns |
| Strength Meter | Per-currency relative strength |
| Exposure Mapper | Net long / short per currency |
| Basket Builder | Custom multi-symbol baskets |
| Heatmap Renderer | Color-coded matrix view |
| Risk Aggregator | Combined risk across open trades |
| Feature | Description |
|---|---|
| Live Matrix | N x N correlation heatmap |
| Strength Bars | USD, EUR, GBP, JPY, etc. |
| Open Position Overlay | Highlights traded pairs |
| Hedge Detector | Flags negatively correlated pairs |
| Window Selector | 20 / 50 / 100 / 200 bars |
| MT4 / MT5 Support | Platform selection system |
| Symbol Sets | FX majors, minors, metals, indices |
| Alert Engine | Threshold-based correlation alerts |
| Export | CSV matrix snapshot |
| Multi-Account Mode | Aggregates across accounts |
- Recomputes on every closed bar
- Smooth rolling window, no lag spikes
- Color scale fixed for visual stability
- Lightweight, runs alongside trading platform
Requirements:
- Windows 10 / 11
- .NET 8+
- Visual Studio 2022
git clone https://github.com/your-username/portfolio-correlation.gitOpen solution → Press F5
- Launch app
- Select MT4 / MT5
- Enter login
- Click CONNECT
- Pick symbol set & timeframe
- Set correlation window
- Click START MATRIX
- Watch overlap and exposure live
EURUSD GBPUSD USDJPY XAUUSD
EURUSD 1.00 0.87 -0.74 0.42
GBPUSD 0.87 1.00 -0.62 0.31
USDJPY -0.74 -0.62 1.00 -0.55
XAUUSD 0.42 0.31 -0.55 1.00
- Deep red = strong positive
- Deep blue = strong negative
- White = near-zero
- Border = currently open pair
- Correlation engine
- Strength meter
- Heatmap UI
- Real MT5 portfolio bridge
- Beta-to-DXY mode
- Rolling factor exposure
- Multi-broker aggregation
1. Fork
2. git checkout -b feature/new-feature
3. git commit -m "Add feature"
4. git push
5. Open PR
MIT
Portfolio Correlation MT5/MT4 · v1.0

