Skip to content
All library documents

A Correlated-Forex Pair Expert Advisor With Hedged Entries

Article MQL5 code base

Summary

This Expert Advisor trades two currency pairs that share a quote currency and are expected to have positive long-term correlation. It examines recent bar history without indicators, looks for both pairs to rise in one portion of the window and fall in another, and checks whether their movements align. If its conditions pass, it chooses a main position and a hedge, calculates the second pair's volume, and opens opposing exposures. Both positions close when combined profit reaches a configured deposit-currency target; the process then repeats. It may remain out of the market while waiting for a setup.

The description offers example pair combinations and says the default settings require a $10,000 deposit. It also describes checks intended to reject negative correlation or false signals. These are design claims, not reported test results: no backtest statistics or evidence of drawdown control are supplied. The author says losses can persist while the EA waits for recovery, and the EA cannot verify long-term correlation itself. Hedging may reduce exposure to trend changes but can also reduce gains, while the lot calculation and strategy's behavior under sustained divergence remain unclear.

Key ideas

  • The EA pairs currencies with the same quote currency and relies on an assumption of positive long-term correlation.
  • It uses recent price movement patterns and correlation checks rather than technical indicators to decide whether to trade.
  • It sizes a main position and a hedge, then closes both when their combined profit reaches a configured target.
  • The EA may wait without positions, and losing trades can remain open for extended periods.
  • The document supplies operating guidance but no empirical performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.