Skip to content
All library documents

A Two-Pair Forex Spreader Based on Recent Price History

Article MQL5 code base

Summary

This description outlines an expert advisor that opens positions across two forex pairs and calculates direction and lot size from recent price history, using the last 60 bars without technical indicators. The stated premise is that the selected pairs should have a long-term positive correlation. The pairs also need the same quote currency, so pip values are comparable; the advisor does not check correlation itself.

The intended spread-trading behavior is to close when the accumulated spread turns profitable, while holding positions through drawdowns in expectation of recovery. That holding approach can expose the account to prolonged losses, and the document gives no stop rule, hedge ratio methodology, or performance statistics. It lists example pair combinations for demo testing and warns against running separate instances that share a currency pair. The description is therefore a basic setup guide for a correlation-based pair strategy, not evidence that the pair relationships or recovery assumption will hold in live markets.

Key ideas

  • The expert advisor derives trade direction and lot size from the preceding 60 bars without indicators.
  • The approach depends on pairs with long-term positive correlation, which the advisor does not verify.
  • Both pairs should share a quote currency so their pip values use the same currency.
  • The advisor may hold positions through extended drawdowns while waiting for recovery.
  • The document recommends demo testing and avoiding overlapping pairs across instances.

Tags

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