Correlation Coefficient PRO
- Индикаторы
- Giuseppe Pajusco
- Версия: 2.0
- Активации: 20
Correlation Coefficient PRO + Moving Average
Advanced dual-asset correlation indicator with dynamic smoothing
Overview
Correlation Coefficient PRO + MA is a powerful indicator that measures the statistical correlation between the current chart symbol and any secondary instrument in real time. Displayed in a separate window, it gives traders an immediate visual reading of how two assets move in relation to each other — whether they trend together, diverge, or move inversely.
The built-in Moving Average overlay allows you to filter out short-term noise and identify structural shifts in correlation regimes with greater confidence.
How It Works
The indicator calculates the Pearson Correlation Coefficient over a configurable rolling window, comparing the closing prices of the chart symbol against any secondary symbol and timeframe of your choice. The result is plotted as a histogram ranging from −1 to +1:
- +1 → perfect positive correlation (assets move in lockstep)
- 0 → no linear relationship
- −1 → perfect inverse correlation (assets move in opposite directions)
An optional Moving Average (SMA or EMA) is overlaid on the correlation histogram to help identify trend direction and regime changes in the relationship between the two instruments.
Key Features
✅ Universal symbol support — compare any pair, index, commodity, or asset class ✅ Multi-timeframe ready — analyze correlation across different timeframes ✅ Configurable correlation period — adapt the lookback to your trading style ✅ SMA / EMA smoothing — toggle and customize the moving average overlay ✅ Robust data handling — automatically skips missing bars to avoid calculation errors ✅ Clean separate window display — histogram + line, fixed scale from −1 to +1 with zero level reference
Input Parameters
| Parameter | Description |
|---|---|
| InpSymbol2 | Secondary symbol to correlate against (e.g. EURUSD ) |
| InpTF2 | Timeframe of the secondary symbol |
| InpCorrPeriod | Rolling window for correlation calculation (default: 50) |
| UseMA | Enable/disable the Moving Average overlay |
| MAPeriod | Period of the Moving Average (default: 10) |
| MAMethod | MA method: SMA or EMA |
Use Cases
- Pair trading & hedging — identify when two historically correlated assets diverge
- Portfolio diversification — measure how independent your positions truly are
- Risk management — detect rising correlation during market stress events
- Macro analysis — track relationships between FX pairs, indices, and commodities
Requirements
- Platform: MetaTrader 5
- Works on any symbol and any timeframe
- The secondary symbol must be available in the Market Watch
