Dollar Correlation EA
- Uzmanlar
- Jonathan Boak
- Sürüm: 1.2
- Etkinleştirmeler: 5
Overview
Dollar Correlation is an Expert Advisor for MetaTrader 5 that identifies trading opportunities by measuring the real-time Pearson correlation between any forex pair and the US Dollar Index (DXY/USDX). When price movement on the traded symbol aligns with a confirmed directional shift in the Dollar — and the two instruments are demonstrably correlated — Dollar Correlation executes a trade in the direction supported by both.
The EA works with any symbol your broker provides and automatically detects the Dollar Index symbol across multiple common naming conventions (DXY, USDX, DX, DOLLAR, and broker-specific variants). If your broker uses a non-standard name, it can also be set manually
Optional Confirmation Filters
Four independent enhancement filters can be enabled or disabled individually:
Trend Filter (EMA 20/50) — restricts entries to trades that agree with the current trend direction on the traded symbol. Buys require the fast EMA to be above the slow EMA; sells require the opposite. Both EMAs are calculated on H1.
RSI Filter — blocks buy entries when RSI(14) is above the overbought level and sell entries when RSI is below the oversold level, avoiding entries into exhausted moves.
Volatility Filter — compares the current ATR against a 20-bar ATR average. Trades are blocked when current volatility is below the minimum ATR multiplier threshold, avoiding low-momentum environments.
Cointegration Filter — performs an OLS regression between the two price series and evaluates the stationarity of residuals as an approximation of cointegration. Trades are blocked when the residual spread appears non-stationary, adding a statistical basis for mean-reversion expectation beyond correlation alone.
All four filters check H1 data. Each can be turned off independently to test the base signal in isolation.
Risk Management
Lot sizing — broker-accurate for any symbol, not relying on tick value approximations. Fixed lot and percentage-of-balance modes are both available.
ATR-based stop loss and take profit — calculated from the H1 ATR at configurable multipliers (default: 2.5× ATR stop loss, 4.0× ATR take profit). An optional correlation adjustment dynamically tightens stops when correlation is strong and widens them when it is weaker, since a weaker correlation reading implies more signal uncertainty.
Fixed-point mode is available as an alternative for users who prefer defined pip-based levels.
Trailing stop — activates above a configurable profit threshold (points) and trails price by a configurable distance (points). Trailing stop management runs on every tick independently of entry condition checks, so it continues working even when the daily loss limit or other filters are active.
Daily loss cap — the EA tracks P&L from the session open balance and halts new entries for the remainder of the day when the configured drawdown percentage is reached.
Spread filter — entries are blocked above the maximum configured spread
Setup Requirements
- Symbol: any forex pair (attach to the chart of the symbol you want to trade)
- Dollar Index symbol: must be available in your broker's Market Watch. The EA auto-detects common names (DXY, USDX, DX, DOLLAR, USDIDX, and broker suffixed variants). If auto-detection fails, set CorrelationMode to Manual and enter the symbol name directly.
- Timeframe: the EA runs on any chart timeframe but uses H1 data internally for all correlation, ATR, and enhancement calculations
- No DLL calls — fully compliant with MQL5 Market requirements
