AI Correlation Pair Scanner
- Utilitaires
-
Fadi Hassan Khaled Ghanem
MQL4/MQL5 developer based in Jordan. I have published 169 MetaTrader 5 products on the MQL5 Market (about 8,800 downloads in total).
What I build:
- Custom Expert Advisors from your own trading rules
- Indicators, alerts and multi-timeframe dashboards - Version: 2.0
- Mise à jour: 22 septembre 2026
AI Correlation Pair Scanner is a real-time multicurrency correlation monitor that helps you avoid hidden overexposure when trading several pairs at once. Many traders unknowingly double their risk by holding positions on two pairs that move almost identically (for example EURUSD and GBPUSD, or the JPY crosses). This tool calculates live Pearson correlation between every pair in your watchlist and warns you the moment your open positions overlap on two highly correlated instruments.
KEY FEATURES
- Scans a fully customizable watchlist (default: EURUSD, GBPUSD, AUDUSD, NZDUSD, USDCAD, USDCHF, USDJPY, XAUUSD) and calculates pairwise correlation using price returns over a configurable lookback (default 100 bars).
- Displays a clean on-chart dashboard listing every pair combination whose absolute correlation exceeds your threshold (default 0.75), color-coded: green for positive correlation, orange for negative correlation.
- Instantly flags in red any correlated pair where you already have positions open on BOTH symbols, so you can see overexposure at a glance.
- Publishes a global terminal variable (AI_Correlation_Overexposed) that other Expert Advisors on the same terminal can read and use as a risk filter before opening new trades - perfect for coordinating a portfolio of multiple EAs.
- Lightweight and non-intrusive: this is a monitoring utility, it does not place, modify or close any trades itself.
- Adjustable recalculation interval and on-chart panel position.
WHO IS THIS FOR
Any trader or portfolio running multiple pairs or multiple EAs simultaneously who wants an early warning system against correlation risk and unintentional over-leveraging.
INPUTS
- Watchlist: comma-separated list of symbols to monitor
- Correlation Bars: number of bars used in the correlation calculation
- High Correlation Threshold: absolute correlation value considered "high"
- Block On Overexposure: enable/disable the shared global variable flag
- Recalc Interval: how often (seconds) the scan refreshes
- Panel X/Y: on-chart position of the dashboard
Attach it to any single chart - it scans all listed symbols regardless of which chart it runs on. Recommended alongside any of our other AI Expert Advisors for a safer, correlation-aware multi-pair trading setup.
Need this tool customized for your own strategy, or an advanced version with extra filters and alerts? Send me a private message on MQL5 and I will reply with an estimate.
