FWS Pair Correlation Rolling Heatmap

🔗 FWS Pair Correlation - Rolling Heatmap & Duplicate-Risk Detector

Stop doubling up on correlated trades. See which pairs really move together.

Pair Correlation computes a rolling Pearson correlation matrix across your watchlist of FX pairs, indices, gold, and crypto - so you can instantly spot pairs moving in lockstep (duplicate risk) and pairs that hedge each other (negative correlation). Compact on-chart panel anchored to your chart symbol, plus a stunning full N×N heatmap in the browser dashboard.

Part of the Forex Weather Station suite.

🧠 Why You Need This

Many traders unknowingly take the same bet twice. Long EURUSD + long GBPUSD isn't a diversified position - it's double exposure to USD weakness. When the correlation between two pairs spikes above +0.70, opening trades in the same direction just doubles your risk without doubling your edge. Pair Correlation flags those situations before you click Buy.

📊 What It Shows

  • Anchor pair - Defaults to your current chart symbol; updates automatically when you switch charts
  • Sorted correlation list - All pairs in your watchlist ranked by absolute correlation against the anchor
  • Bidirectional bars - Centered on zero; positive correlation fills right, negative fills left
  • Threshold ticks - Faint vertical marks at ±0.70 so you can see at a glance which pairs cross the danger line
  • Status labels - STRONG+, MOD+, WEAK+, NEUTRAL, WEAK-, MOD-, STRONG-
  • Duplicate-risk warning card - Counts strong-positive and strong-negative pairs vs the anchor
  • Color-coded - Green strong positive, soft green moderate, amber neutral, soft red moderate, red strong negative

🌐 Stunning HTML Web Dashboard

Click "Open Heatmap Dashboard" for a full-screen browser dashboard featuring:

  • Full N×N heatmap matrix - Every pair vs every other pair, opacity-graded by correlation strength
  • Anchor correlation grid - Two-column sorted list with bidirectional bars
  • Stats cards - Anchor symbol, pairs tracked, strong-positive count, strong-negative count
  • Glassmorphism dark theme matching the Forex Weather Station design
  • LIVE connection - updates every 5 seconds from MT5 data
  • Bookmark the URL once, access with one click forever

🧮 The Math

Pair Correlation uses standard Pearson correlation on log returns:

r_i = ln(C_i / C_{i-1}) ρ(X,Y) = Σ((x - μx)(y - μy)) / sqrt(Σ(x - μx)² · Σ(y - μy)²)

Log returns are the right choice for correlated price series - they're stationary, scale- invariant, and produce comparable values whether you're correlating EURUSD against XAUUSD or USDJPY against BTCUSD. Sample window is configurable (default 50 bars).

⚙️ Fully Configurable Pair Universe

Unlike most correlation indicators, Pair Correlation lets you set your exact watchlist via a single comma-separated input:

InpPairList = "EURUSD,GBPUSD,USDJPY,USDCHF,AUDUSD,USDCAD,NZDUSD,
                EURJPY,GBPJPY,EURGBP,AUDJPY,EURAUD,XAUUSD,BTCUSD"

Drop in NAS100, US500, ETHUSD, EURUSDm, or any broker-specific symbol. Missing symbols are silently skipped - no errors, no nags. The default list covers 14 popular FX/cross/CFD symbols and works on virtually every broker out of the box.

✨ Key Features

  • Up to 20 pairs - 14 default majors + crosses + gold + bitcoin (extendable to your liking)
  • Pearson on log returns - Mathematically correct for price-series correlation
  • 5 selectable timeframes - M5, M15, H1, H4, D1
  • Configurable lookback - 20, 50, 100, 200 bars (or any value)
  • Configurable strong/moderate thresholds - Default 0.70 / 0.40
  • Auto-anchor mode - Anchor follows the chart symbol; switch charts and the panel re-anchors
  • Custom anchor mode - Pin the anchor to a specific pair regardless of chart
  • Symbol suffix support - Works on brokers using ".raw", "m", etc.
  • Silent missing-symbol handling - Pairs not on your broker are quietly skipped (no log spam)
  • Duplicate-risk warning - Instant visual flag when you have correlated positions
  • Draggable panel - Click the border and drag anywhere on your chart
  • Minimise button - Collapse to a compact title bar with [-]
  • Fully customisable colours
  • JSON data bridge - Full matrix exported every 5 seconds for integration
  • No DLL required - Pure MQL5, marketplace-compliant
  • No external API - All calculations from MT5 data

📋 Input Parameters

Parameter Description Default
InpPanelX / Y Panel position on chart (pixels) 20, 50
InpAnchorMode Anchor follows chart symbol or fixed Chart Symbol
InpAnchorOverride Anchor pair (Custom mode only) EURUSD
InpPairList Comma-separated watchlist of pairs 14 majors+crosses
InpSymbolSuffix Broker suffix (e.g. ".raw", "m") (blank)
InpCorrTF Correlation timeframe H1
InpLookbackBars Sample window in bars 50
InpStrongLevel |r| threshold for STRONG label 0.70
InpModerateLevel |r| threshold for MODERATE 0.40
InpFont / InpFontSize Font name and size Consolas / 9pt
InpColor* All panel colours customisable Dark theme
InpWriteJSON Enable JSON/HTML data output true
InpEnableWebBtn Show "Open Web View" button true

📦 What's Included

  1. MQL5 Indicator - Compact 380px on-chart panel with sorted correlation list, threshold ticks, duplicate-risk warning
  2. HTML Web Dashboard - Auto-generated to MQL5/Files/FWS/correlation.html with full N×N heatmap
  3. JSON Data Bridge - Anchor row + full matrix written every 5 seconds for external integration

🔧 Quick Start

  1. Attach the indicator to any chart (any symbol, any timeframe)
  2. The panel anchors to your chart's symbol and ranks all watchlist pairs by correlation
  3. Click "Open Heatmap Dashboard" for the full N×N browser view
  4. Bookmark the URL for instant one-click access in the future
  5. Switch your chart to a different pair - the panel re-anchors automatically
  6. If your broker uses a suffix (e.g. EURUSD.raw), set InpSymbolSuffix
  7. Add or remove pairs by editing InpPairList (comma-separated, no spaces needed)

🔌 Part of the Forex Weather Station Suite

Module 5 of the Forex Weather Station - a suite of 7 specialised trading tools that each work standalone or combine into a unified premium dashboard:

# Module What It Does Price
1 🌊 Tide Clock Session clock & activity monitor FREE
2 ⛈️ Storm Watch Economic news radar & impact alerts FREE
3 💨 Pair Bias Multi-timeframe directional bias
4 🌡️ Currency Strength 8-currency strength meter
5 🔗 Pair Correlation (this) Correlation matrix & duplicate-risk detector
6 📡 Pullback Radar Multi-pair pullback pipeline scanner
7 🧭 Navigator Trade signal scorer combining all modules
🌦️ Weather Station All 7 modules + master HTML dashboard

Each module writes data to a shared JSON bridge. The premium Weather Station bundle combines everything into one stunning real-time dashboard.

⚠️ Requirements

  • MetaTrader 5 (build 3000+)
  • FX pairs in your watchlist available on your broker (missing symbols are silently skipped)
  • Web dashboard requires a modern browser (Chrome, Edge, Firefox)
  • No DLL imports required
  • No external API or API key required

💡 Tips

  • Use H1 for day trading, H4/D1 for swing trading. Lower timeframes correlate noisier; higher timeframes reveal structural relationships.
  • Anchor follows your chart - Just switch to USDCHF and the panel instantly shows USDCHF's correlations. No re-attaching needed.
  • Watch the threshold ticks - The faint vertical marks at ±0.70 help you spot pairs crossing the duplicate-risk line at a glance.
  • Negative correlation = hedge - A pair with -0.85 correlation moves opposite to your anchor. Useful for hedging or pairs trading.
  • Add CFDs to the watchlist - Drop NAS100, US500, US30, GER40, ETHUSD, etc. into InpPairList . Correlation works on any tradable symbol.
  • 50-bar default is a sweet spot - long enough to be statistically meaningful, short enough to react to regime changes. Increase to 100/200 for more stable values.
  • The JSON file at Files/FWS/correlation.json contains the full matrix - your EAs can read it to filter trade signals based on portfolio correlation.

By Trading Edge - tradingedge.online

Yazarın diğer ürünleri
FWS Tide Clock — Session Clock & Activity Monitor Know when to trade — at a glance. FWS Tide Clock is a real-time session clock that shows you exactly what's happening across global forex markets. See which sessions are active, when they overlap, and whether conditions favour trading — all from a compact on-chart panel with a stunning browser-based web dashboard. Part of the Forex Weather Station suite. This free module gives you instant market timing awareness — right where you need it. W
FREE
Account PL Performance Dashboard Pro Know exactly where you stand — at a glance. Account PL Performance Dashboard Pro is a clean, professional on-chart performance panel that shows your closed trade results broken down by multiple time periods — all in one place, updated in real time on every tick. Stop switching to the History tab or running reports. Everything you need to track your daily, weekly, and long-term performance is right on your chart — always visible, always current. What It Sho
️ FWS Storm Watch — Economic News Radar & Storm Warning System Never get blindsided by news again. Storm Watch monitors the MT5 Economic Calendar in real time, filters upcoming events by currency and impact level, calculates a weather-style severity rating, and alerts you before high-impact releases. All from a compact on-chart panel with a stunning browser-based web dashboard. Part of the Forex Weather Station suite. Uses MT5's built-in calendar. What It Shows Severity Rating — Weather-styl
FREE
FWS Pair Bias — Multi-Timeframe Directional Bias Watchlist See where the wind is blowing — across every pair, every timeframe. Pair Bias scans up to 8 forex pairs across 5 timeframes (M5/M15/H1/H4/D1) and computes a weighted composite directional score for each pair. Two scoring methods are built in — pick the one that matches your style. All from a compact on-chart panel with a stunning browser-based web dashboard. Part of the Forex Weather Station suite.  What It Shows Watchlist of 8 Pai
️ FWS Currency Strength - 8-Currency Multi-Timeframe Meter See which currency is strongest - and which pair to trade right now. Currency Strength ranks all 8 G8 currencies (USD, EUR, GBP, JPY, AUD, CAD, NZD, CHF) from strongest to weakest using true cross-pair averaging across 5 timeframes (M5/M15/H1/H4/D1). It then auto-suggests the best pair to trade - the strongest currency vs the weakest. Compact on-chart panel plus a stunning browser dashboard. Part of the Forex Weather Station suite.
Why Pullback Radar Is Different Most "scanner" indicators on the market just print arrows when a moving average crosses. That's not a strategy — that's noise. Pullback Radar implements the discipline that professional continuation traders actually use. It tracks each pair through a precise three-stage pipeline. A pair is only a SIGNAL when all three stages have completed in order — bias formed, retrace happened, momentum returned. That ordering is what filters fake-out arrows from real trade-
Why Navigator Is Different Most trading dashboards are just another indicator — one more panel competing for the same patch of screen real estate. Navigator does the opposite: it consumes the output of every other Forex Weather Station module and condenses your entire market read into one master score per pair . It is a pure aggregator. It computes nothing from raw price. It reads the live JSON heartbeat written by Pair Bias, Currency Strength, Pullback Radar, Storm Watch, and Tide Clock — th
Filtrele:
Değerlendirme yok
Değerlendirmeye yanıt