What’s the Correlation Filter?
The Correlation Filter is a danger administration characteristic in a buying and selling robotic (Skilled Advisor). It screens the relationships between foreign money pairs (or different buying and selling devices) when the bot considers new trades. Particularly, it checks how intently two devices transfer collectively over time utilizing a statistical correlation measure. When the filter is enabled, the EA calculates the correlation between the image it desires to commerce and every image of any open positions. If any of those correlations exceeds the user-defined threshold, the brand new commerce shouldn’t be opened.
Correlation is expressed as a price between –100% and +100%. Values close to +100% imply the 2 pairs have a tendency to maneuver in the identical path, whereas values close to –100% imply they have a tendency to maneuver in reverse instructions. A worth round 0% signifies little to no linear relationship. The consumer’s threshold is in comparison with these values: for instance, if the edge is ready to 80%, any correlation above 80% (constructive or unfavourable) will block the commerce.
How the Correlation Filter Works
When enabled, the buying and selling robotic calculates a correlation coefficient for every potential new commerce towards every at present open place. This calculation makes use of latest historic value knowledge (for instance, closing costs over the past N bars or days). After computing the correlations, the EA compares every consequence to the edge:
-
If absolutely the correlation is above the edge (for instance, 90% above a threshold of 80%), the brand new commerce is blocked.
-
If the correlation is beneath the edge, the commerce proceeds usually.
This test happens each time the EA makes an attempt to open a brand new commerce. If there are not any open positions, or if all calculated correlations are beneath the edge, the filter doesn’t cease the commerce. In impact, the bot will solely open new trades when doing so doesn’t create positions which are too extremely correlated with its present portfolio.
Operational Variations: Filter Off vs On
-
Filter Disabled: The robotic opens trades primarily based purely on its core technique. There are not any checks for a way comparable or completely different the brand new commerce is relative to present trades. The EA treats every image independently.

-
Filter Enabled: Earlier than opening a brand new commerce, the robotic evaluates the correlation with every open place. It then solely opens the commerce if all correlations are inside the allowed restrict. Because of this, extremely correlated trades are skipped, decreasing overlapping publicity between symbols.

Configuring the Correlation Filter
Customers can customise the Correlation Filter with a number of parameters:
-
Enabled: An on/off swap to activate or deactivate the correlation test.
-
Correlation Threshold (%): A proportion worth (0 to 100) defining how sturdy a correlation have to be to dam a commerce. For instance, setting this to 80% means the filter blocks trades with correlations above 80%.
-
Calculation Interval: The variety of previous value knowledge factors (bars or days) used to compute the correlation. An extended interval (extra knowledge factors) smooths out short-term noise, whereas a shorter interval makes the filter reply sooner to latest market modifications.
-
Timeframe: The chart timeframe (comparable to 1 hour, 4 hours, or each day) used for the worth knowledge within the correlation calculation.
-
Symbols to Monitor: An inventory of buying and selling symbols the filter checks towards. This may embrace all symbols your EA trades or a specific subset.
-
Ignore Damaging Correlation (optionally available): Some implementations permit treating constructive and unfavourable correlations in a different way. By default, most filters use absolutely the worth of the correlation, so each strongly constructive and strongly unfavourable correlations can set off the filter in the event that they exceed the edge.
These settings are usually discovered within the EA’s enter or choices panel. Adjusting the edge and different parameters modifications how conservative the filter is. For instance, a better threshold (like 95%) means solely extraordinarily comparable pairs shall be blocked, whereas a decrease threshold (like 50%) will block even reasonably correlated pairs.
Instance Utilization
Think about that the bot has an open purchase place in EURUSD. If the robotic tries to open a place in GBPUSD on the identical time, the filter will compute the historic correlation between EURUSD and GBPUSD.
-
If their correlation is, say, 90% and the edge is 80%, the filter will stop the GBPUSD commerce as a result of 90% exceeds 80%.
-
If the edge had been set to 95%, the GBPUSD commerce could be allowed, since 90% is beneath 95%.
In sensible phrases:
-
With the filter off, the bot may open trades on EURUSD and GBPUSD concurrently if its technique indicators achieve this, even when the pairs transfer collectively more often than not.
-
With the filter on (for instance, threshold 90%), it will skip a type of trades if their historic correlation is above 90%, avoiding two very comparable positions without delay.
These choices permit merchants to tailor how strictly the EA avoids correlated trades. There are not any ensures both method, the filter merely prevents opening trades that exceed the desired correlation standards.
