PairTrading

PAIR TRADING: multi-currency pair trading (statistical arbitrage) Expert Advisor

The EA trades pairs of correlated instruments. When two related instruments drift apart further than usual, it opens a hedged pair: it sells the one that ran ahead and buys the one that lagged. The pair is closed on its total profit once the divergence returns to the mean.

How it works

  • For every pair the EA measures the current correlation and its stability on history. A pair with weak or unstable correlation is not traded.
  • Divergence is measured in points, adjusted for the volatility ratio of the two instruments. Entry is taken when the divergence reaches a set percentage of its historical maximum (75% by default).
  • If the divergence keeps growing, the pair is averaged through a trailing virtual order: a new step opens only after the divergence turns back. The number of steps and the total volume are capped.
  • Exits: pair profit target, divergence back at zero, total account profit percentage, equity growth per cycle.
  • Protection: per-pair loss limit (percent of balance or money), close on correlation breakdown, margin level check before every entry, pause after a failed order.

Features

  • Any number of pairs in a single EA. Pairs and per-pair settings are comma-separated lists; broker symbol suffixes are supported.
  • Attach to one chart of any symbol and timeframe.
  • Works on hedging and netting accounts (on netting, pairs must not share symbols).
  • Built-in full-chart dashboard: correlation, divergence with the entry threshold, positions, profit and statistics per pair, and an event log. Buttons disable a pair or close it manually.
  • No directional bets: the result depends on prices converging inside a pair, not on the trend.

Default pairs

EURGBP/GBPCHF, EURJPY/CHFJPY, AUDCAD/NZDUSD, EURUSD/USDCHF (calculation timeframe M5).

Recommendations

  • Hedging account, low spreads and commissions (ECN), leverage 1:100 or higher.
  • Deposit from 1000 USD with 0.01 lot per 1000 of balance (LotPer1000).
  • Run 24/5 on a VPS.
  • Backtest with "Every tick based on real ticks". In "1 minute OHLC" mode the tester generates each symbol's ticks separately. That creates false divergences between instruments and inflates the result.

Main inputs

  • Symbols1 / Symbols2: first and second instruments of the pairs.
  • FixedLot / LotPer1000: fixed lot or lot from balance.
  • LotMultiplier, MaxOrders, MaxLot: averaging multiplier and caps.
  • CorrOpenMin, CheckHistoryCorr, CorrHistoryMin: correlation filters.
  • EntryPercent: entry threshold as a percent of the maximum divergence.
  • ProfitDivider, MinPairProfit: pair profit target.
  • PairLossPct / PairLossMoney, DisableAfterLoss: loss limit.
  • EquityTargetPct, TotalProfitPct: close all pairs at an account-level target.
  • MinMarginLevel: minimum margin level after an entry.

Risks

Correlation between instruments can weaken or break. The divergence then does not return and the pair is closed at its loss limit. Averaging increases the position size. Raise the lot only after testing on real ticks and on a demo account. Past results do not guarantee future results.

Plus de l'auteur
Gold Hammer
Renat Burangulov
GoldHammer v2.60 PRO (by ProfitFX) GoldHammer is a high-performance trading robot specifically engineered for trading Gold ( XAUUSD ) on the M5 timeframe. The EA is built on a synergy of classic trend and volatility indicators combined with a powerful grid-based money management system . Core Strategy Features: Triple Entry Filtration : The EA initiates the first trade in a grid only when conditions of three indicators align: RSI (Relative Strength Index), ATR (Average True Range), and MACD . Th
NDX Open
Renat Burangulov
NDX OPEN : un trade par jour à l'ouverture américaine Les premières minutes après l'ouverture de la séance américaine fixent souvent la direction du NASDAQ 100 pour le reste de la journée. L'EA lit la direction de la première bougie de 10 minutes après 9h30 New York et ouvre un trade dans ce sens. Le stop vaut 0,1 × ATR journalier et l'objectif 10 × le stop ; sinon le trade est clôturé à 15h50 New York. Fonctionnement À 9h40 New York, l'EA construit la bougie d'ouverture à partir des barres M1 (
Filtrer:
Aucun avis
Répondre à l'avis