Pair Divirgence Hybrid
- Experts
- Version: 27.40
- Activations: 10
Pair Divergence Hybrid is a MetaTrader 5 Expert Advisor designed for statistical pair trading between two selected instruments.
The EA analyzes the relationship between two symbols and looks for moments when their statistical spread diverges from its normal range. When the divergence reaches the configured threshold, the EA opens a two-leg basket position: one symbol is bought and the second symbol is sold, or vice versa. The exit logic is based on statistical mean reversion, basket profit and emergency protection settings.
The default configuration is designed for EURUSD and XAUUSD on the M1 timeframe, but the input symbols can be changed manually depending on your broker’s available instruments and suffixes.
Main Features
-
Multi-symbol pair trading logic
-
Statistical divergence and mean-reversion approach
-
Two-leg basket entries
-
Correlation filter
-
Custom symbol inputs
-
Broker suffix support through manual symbol settings
-
Adjustable lot size for each symbol
-
Basket-based exit logic
-
Optional basket profit target
-
Optional emergency basket loss protection
-
Works with MetaTrader 5 Strategy Tester
-
No martingale
-
No grid
-
No DLL
-
No external files
-
No WebRequest
How It Works
The EA compares two selected symbols using statistical normalization and correlation analysis. When the spread between the symbols reaches an extreme level, the EA opens a pair trade expecting partial or full mean reversion.
The position is closed when one of the exit conditions is met:
-
basket profit target
-
statistical return of the spread
-
deep mean-reversion zone
-
optional emergency profit or loss level
Default Symbols
Default pair:
-
Symbol A: EURUSD
-
Symbol B: XAUUSD
Some brokers use suffixes, for example EURUSD.m, EURUSD.raw, XAUUSD.pro or similar. In this case, set the exact broker symbols manually in the EA inputs.
Recommended Timeframe
Recommended timeframe: M1
The EA can technically be attached to other charts, but the default logic and parameters are designed for M1 data.
Important Inputs
-
Symbol A — first trading symbol
-
Symbol B — second trading symbol
-
Lots A — lot size for Symbol A
-
Lots B — lot size for Symbol B
-
Lookbacks — statistical lookback period
-
DeltaY — entry threshold
-
CorrThreshold — minimum correlation filter
-
ExitZReturn — statistical return exit level
-
ExitProfitMoney — basket profit exit
-
ExitDeepAbsZ — deep mean-reversion exit
-
CloseTargetProfit — emergency basket profit level
-
CloseTargetLoss — optional emergency basket loss level
Recommended Use
Before using the EA on a live account, test it in the MetaTrader 5 Strategy Tester with your broker’s exact symbols, spread, commission and execution conditions.
Recommended first test:
-
Timeframe: M1
-
Symbols: EURUSD and XAUUSD or broker-specific suffix versions
-
Modeling: every tick based on real ticks
-
Deposit: sufficient for both basket legs
-
Account type: hedging account is recommended
Risk Notice
Trading involves risk. This Expert Advisor does not guarantee profit and past performance does not guarantee future results. Market conditions, broker execution, spread, commission, slippage and symbol specifications can significantly affect trading results.
Use appropriate risk management and test all settings before live trading.
