Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2015.01.21 13:19

Pairs Trading - expert for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

votes: 33

The robot opens two positions, profit and loss of which overlap each other. In other words two positions are opened: one has positive profit, while the other has negative profit. After that the robot waits for positive profit of these orders and closes positions.

The robot is capable of trading in two modes: manual and automatic (when the robot itself makes decision upon purchase or sale depending on a trade session). You shall state the symbols you have (pair or mirror) to work in the automatic mode.

You have pair symbols if symbol charts are similar.

You have mirror symbols if symbol charts are reflected specularly.

The robot provides profits statistics:



You will need correlation indicators for the EA. It shall be installed in terminal data folder\MQL5\Indicators as in the figure:

Key parameters

  • Correlation bail for orders opening - correlation value according to which positions are opened.
  • How many times you can try to open an order - if your agency does not open a position on the first try, this parameter will state how many times one position can be opened .
  • Lots for the 1st symbol, Lots for the 2nd symbol - number of lots is selected in such a way that profit of one pair overlaps loss of the other pair. I.e. symbol profit shall be equal to zero (but during "tranquil" correlation only (see the figure)).

EURUSD and USDCHF Statistics

This statistic data is obtained from MetaTrader 5 tester. In practice such statistic can appear only on stocks, futures, options, and Forts markets (the latter is more volatile). As for FOREX, suitable markets were found abroad (for instance, or Why abroad? Because at night Russian agencies close and then open your positions, meanwhile loss taking (in the course of pairs trading) can happen.

Translated from Russian by MetaQuotes Software Corp.
Original code:

IcqMessenger IcqMessenger

System of receiving information concerning opened positions' current state, account, etc., as well as automatic notification about operations via ICQ.

Exp_ExchangePrice Exp_ExchangePrice

The Exp_ExchangePrice EA is based on the signals of the ExchangePrice trend indicator.

Exp_CronexMFI Exp_CronexMFI

The Exp_CronexMFI is based on the signals generated by the CronexMFI oscillator.

Exp_CronexRSI Exp_CronexRSI

The Exp_CronexRSI is based on the signals generated by the CronexRSI oscillator.