Correlated MT5
- Experts
-
Ulises Calderon Bautista
I am a candidate for Actuary with a strong expertise in the field of insurance and social security, in addition to being an active investor with a talent for mathematics. My passion for programming and finance drives my constant pursuit of learning and improvement. - Version: 8.1
- Updated: 25 May 2026
- Activations: 10
## 🇺🇸 English
### Correlated MT5 v8.1
Correlated MT5 v8.1 is a multi-symbol Expert Advisor for MetaTrader 5 that analyzes asset baskets, correlation, and mean reversion. It can be used as a market-reading dashboard or as an automated system with exposure, position sizing, and risk controls.
#### How it works
- Builds a basket with 3 to 10 symbols and normalizes their prices.
- Calculates a correlation matrix and can filter noise with Random Matrix Theory.
- Entries require a minimum correlation with the configured basket.
- Long signal: the effective Z-score is below `-ZScoreEntry` and/or the S-score is below `-SScoreEntry`, depending on `SignalMethod`.
- Short signal: the effective Z-score is above `ZScoreEntry` and/or the S-score is above `SScoreEntry`, depending on `SignalMethod`.
- Cointegration can filter, replace, or combine the spread used by the signal; Kalman can update the hedge ratio.
- Exits are triggered by mean reversion, extreme score, correlation breakdown, maximum holding time, critical drawdown, or crisis regime.
#### Parameters
| Parameter | Default value | Description |
|---|---:|---|
| `BasketSymbols` | `EURUSD,GBPUSD,AUDUSD,NZDUSD,USDCHF,USDCAD,USDJPY` | Basket symbols, separated by commas. |
| `Timeframe` | `PERIOD_CURRENT` | Timeframe used for analysis and trading. |
| `BasketLookback` | `100` | Bars used to normalize basket prices. |
| `CorrelationLookback` | `60` | Bars used to calculate correlations. |
| `MagicNumber` | `34567` | Identifier for EA positions. |
| `Slippage` | `10` | Maximum order deviation in points. |
| `LotMethod` | `LOT_KELLY_ADAPTIVE` | Lot sizing model. |
| `FixedLots` | `0.02` | Fixed lot size when fixed sizing is used. |
| `RiskPerTrade` | `0.5` | Risk reference per trade as a percentage of balance. |
| `MaxPositions` | `4` | Maximum open positions at the same time. |
| `MaxPortfolioRisk` | `2.0` | Estimated total portfolio risk limit. |
| `KellyFraction` | `0.25` | Fraction applied to the Kelly calculation. |
| `KellyMaxLeverage` | `2.0` | Maximum adaptive size multiplier. |
| `EnableDrawdownControl` | `true` | Reduces or stops new entries during drawdown. |
| `MaxDrawdownLimit` | `0.15` | Limit used by the drawdown protection model. |
| `EnableVolatilityScaling` | `true` | Adjusts size toward a target volatility. |
| `TargetVolatility` | `0.10` | Annualized target volatility. |
| `SignalMethod` | `SIGNAL_ENSEMBLE` | Method used to combine signals. |
| `ZScoreEntry / ZScoreExit` | `1.9 / 0.95` | Entry and exit levels by Z-score. |
| `SScoreEntry / SScoreExit / SScoreStop` | `1.1 / 0.35 / 2.3` | Entry, exit, and stop levels by S-score. |
| `MinCorrelationToBasket` | `0.4` | Minimum absolute correlation required for entries. |
| `MaxBarsInPosition` | `72` | Maximum bars to hold a position. |
| `StopLossMethod / ATR_SL_Multiplier` | `SL_ATR_BASED / 2.5` | Stop loss method and ATR multiplier. |
| `TakeProfitMethod / ATR_TP_Multiplier` | `TP_ATR_BASED / 5.0` | Take profit method and ATR multiplier. |
| `EnableRegimeDetection` | `true` | Detects normal, elevated, stress, or crisis regime. |
| `RegimeCloseOnCrisis` | `true` | Allows positions to close if a crisis regime is detected. |
| `CorrelationMethod` | `CORR_PRICES` | Series used for correlation analysis. |
| `AutoHandleNegativeCorr` | `true` | Inverts logic for symbols with strong negative correlation. |
| `EnableRMT / RMT_Method` | `true / RMT_AVERAGE_NOISE` | Correlation filtering with Random Matrix Theory. |
| `EnableOU / OU_Lookback` | `true / 60` | Enables the Ornstein-Uhlenbeck filter and its window. |
| `EnableCointegration / CointSignalUse` | `true / COINT_REPLACE_SPREAD` | Enables cointegration and defines how it affects the signal. |
| `CointLookback / CointSignificance` | `400 / 0.01` | Window and ADF level for cointegration tests. |
| `EnableKalmanHedge / HedgeMethod` | `true / HEDGE_KALMAN_DYNAMIC` | Enables dynamic hedge ratio with Kalman filter. |
| `ShowDashboard / PanelSize` | `true / PANEL_MEDIUM` | Shows the dashboard and sets its size. |
| `PanelCorrMethod / PanelDataSize` | `PANEL_CORR_RAW_PRICES / 224` | Method and window for the correlation panel. |
| `PanelTF1-PanelTF5` | `M5, M15, H1, H4, D1` | Dashboard timeframe buttons. |
| `PanelMetric1-PanelMetric10` | `YZ Vol, Hurst, Amihud, EffRat, AutoCr, None...` | Custom metric rows in the dashboard. |
#### Key characteristics
- Expert Advisor for MetaTrader 5 with multi-symbol analysis.
- Integrated dashboard with correlation matrix, returns, and configurable metrics.
- Can be used for visual analysis only or with automated execution.
- Signal decisions are evaluated on new bars; it does not redraw historical arrows as fixed signals.
- Designed for liquid Forex and CFD symbols available from the broker.
- Practical timeframes: M15 to H4 for trading, M5 for monitoring, and D1 for context.
- Includes position limit, portfolio risk cap, volatility scaling, and regime filters.

