Adding a correlation filter to a multi-pair EA, so it won't open EURUSD and GBPUSD longs at the same time, sounds simple. Several approaches have known pitfalls.
Rolling correlation on short windows: a 20-day window jumps around, so the filter turns on and off for no good reason.
Long windows: 120 days reacts too slowly to regime changes, for example a sterling-specific crisis.
Correlation on M1 returns: noisy, and dominated by the dollar leg anyway.
Counting exposure by currency instead of correlation: simpler, and often more robust.
The currency-exposure approach in practice: convert every open position into exposure per currency, for example long EURUSD 1 lot = +1 EUR, −1 USD. Cap net exposure per currency. A long EURUSD and a long GBPUSD together give −2 USD, which hits the cap even if the pair correlation looks moderate this month.
It's easier to test, easier to explain and doesn't need parameter tuning.
Has anyone made correlation filters work in a live EA?
The twenty-five-day correlation filter kept flipping on and off across my EURUSD, GBPUSD and AUDUSD basket. In six weeks it changed state seventeen times, and during one Bank of England week it blocked eight otherwise valid GBPUSD longs just because the rolling number had dipped. The window was too short to be stable and too slow to catch a sterling-only move in any useful way. Correlation measured on M1 returns was even noisier and mostly just captured the shared dollar leg.
I threw that out and capped net currency exposure instead. Every open position is converted into plus or minus lots per currency, and I will not let net USD exceed one point four lots. A long EURUSD plus a long GBPUSD now hits the cap even if the pair correlation looks moderate that month.
That version has been live for thirteen weeks. The worst day dropped from a two point one percent draw to zero point eight, mainly because I stopped stacking two shorts against the dollar by accident. It is easier to test and I have not had to retune a lookback since.