Gold Correlation Trader
- エキスパート
- バージョン: 1.60
- アクティベーション: 5
Correlation Trader Basket is an automated Expert Advisor for MetaTrader 5 designed to identify temporary price divergences between historically correlated instruments. It uses correlation analysis, regression-based hedge ratios and statistical mean-reversion signals to identify potential pair-trading opportunities.
Instead of relying on the direction of a single instrument, the EA monitors two related instruments and looks for situations where their price relationship moves unusually far from its historical range.
Key Features
-
Automatic Pair Discovery: Scans a user-defined list of broker instruments and selects eligible pairs with the strongest positive correlation.
-
Forex and Commodity CFDs: Supports compatible forex pairs and commodity CFDs, including instruments such as gold and silver, subject to broker availability.
-
Correlation Filtering: Uses Pearson correlation of logarithmic returns to filter potential trading pairs.
-
Statistical Divergence Detection: Uses regression-based spread calculations and Z-score analysis to identify potential entry opportunities.
-
Automated Two-Leg Trading: Opens complementary buy and sell positions when the configured entry threshold is reached.
-
Mean-Reversion Exits: Closes positions when the spread returns towards its historical average.
-
Risk and Margin Controls: Includes configurable lot sizing, optional approximate risk-based sizing, and a combined margin-use limit.
-
Trading Session Protection: Checks instrument trading sessions before opening or closing positions.
-
Daily Loss Protection: Can halt new trading and attempt to close existing positions when the configured daily equity-loss threshold is reached.
-
Maximum Holding Period: Allows positions to be closed after a configurable holding time.
-
Friday Protection: Can attempt to close open positions at a specified Friday server time.
How It Works
1. Find correlated instruments
The EA evaluates eligible instrument pairs using historical price data and a configurable minimum correlation threshold.
2. Measure price divergence
It calculates a regression-based relationship between the two instruments and measures how far the current spread has moved from its historical average.
3. Identify trading opportunities
When the Z-score reaches the configured entry threshold, the EA opens opposing positions across the two instruments.
4. Manage and exit positions
Positions are monitored for mean reversion, excessive divergence, maximum holding time, daily risk limits and Friday closing conditions.
Customizable Parameters
Users can configure the trading timeframe, historical lookback period, minimum correlation, entry and exit Z-score thresholds, stop Z-score, lot size, margin-use percentage, maximum holding hours, spread limit, daily loss limit and trading magic number.
The EA also allows users to select automatic pair discovery or specify their own instrument pairs.
Important Information
-
Requires MetaTrader 5 and a broker account offering the selected instruments.
-
Instrument names must match the broker's symbol names, including any suffixes.
-
Trading sessions, spreads, contract specifications and margin requirements vary by broker.
-
The EA does not guarantee profits or eliminate market risk.
-
A market closure can delay a position exit until trading resumes.
-
The strategy uses statistical relationships that can change over time. Correlation does not guarantee that prices will revert to their historical relationship.
-
The optional risk-based lot calculation is an approximate sizing method, not a guaranteed maximum-loss calculation.
