Skip to content
All library documents

Pair Trading with Convergence and Volatility-Adjusted Position Sizing

Article MQL5 code base

Summary

This indicator is designed to compare two instruments for a convergence trade. It plots an averaged line for each instrument and a third line that represents the distance between them, with colors distinguishing divergence from convergence. The suggested setup is to sell the upper instrument and buy the lower one when a pronounced divergence begins to close, then exit when the instrument lines cross.

The indicator also calculates relative trade volumes to balance the pair. One sizing approach compares instrument prices, while another accounts for volatility, contract size, minimum price movement, and tick value; the document cautions that the price-based approach does not suit forex. The description provides no entry thresholds, evidence of profitability, or details on controlling exposure if the spread keeps widening. Pair selection and empirical validation remain necessary before treating convergence as a reliable signal.

Key ideas

  • The indicator compares averaged price lines for two instruments and shows their divergence or convergence.
  • The proposed trade sells the upper instrument and buys the lower one as divergence starts to contract.
  • The suggested exit occurs when the two instrument lines cross.
  • A sizing calculation aims to balance the pair using instrument volatility and contract characteristics.
  • The document gives no performance evidence or safeguards for a divergence that continues to widen.

Tags

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