Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 4 Experts | Arbitrage | MQL5 Release

RobotFX curates the best open-source MetaTrader code to inspire your trading automation.

Image for Arbitrage


There are multiple was of resisting sharp falls in equity, namely, placing several EAs on different symbols for trading. In this case there is a diversification that smooths the decrease in equity. The second method provided in the EA is a grouped multi-trading several symbols with reverse quotes. In this case, if one symbol has an uptrend and another has a downtrend, then the EAs on the uptrend will sell and the EAs on the downtrend will buy. This feature is the real arbitrage - when buying cheap on one symbol, and selling dear on the other, the result of such speculation will be reflected not on the balance, but on the equity, which is the most important. The balance will recover everything after reversals or rollbacks.


The reverse rates do not have to be in the deposit currency. They can be of any currency, as long as all symbols have the same first currency. For example:

  • Inverse to Dollar: USDJPY, USDCHF, USDCAD, USDSGD and so on;
  • Inverse to Euro: EURUSD, EURGBP, EURCHF, EURJPY and so on;
  • Inverse to Pound: GBPUSD, GBPYPY, GBPCHF, GBPNZD and so on.

Another important note: all pairs of group should have the same size of specification contracts. Most often the Dealing Centers set 100000 units per lot. If the contract sizes of any pair differ from that of the other pairs of the group, then such currency pair can not be included in that group.

Unique stair-step trend trading with the Stairsteps Expert Advisor. Innovative approach for consistent results. Learn more.

How to configure. Every EA has only three non-optimizable (nothing to optimize) parameters:

  1. experts - the number of experts in the group of the inverse rate currency. For example, if there are three experts on the USDJPY, USDCHF and USDCAD charts, this parameter must be equal to 3. But the magic number for all three experts must be the same. When testing separate experts this parameter should be set to 1. The multi-currency mode is not supported in the tester, so the experts of a group can only be tested individually;
  2. MagicNumber - magic number. Intended to distinguish the EA groups of the inverse rate currency. It should be noted that at the moment of placing the EA group the account history should not contain any closed trades with a magic number matching the number of the first group. The EA looks through the account history of both open and closed positions, and on their basis performs its calculations;
  3. beginPrice - the initial Bid price for a specific instrument. This refers to the current price at the time of placing the EA. If the EA is tested on history data, then the price in the beginning of history should be set.

All the parameters for each EA are set once before its start and are not changed during the automated trading - constant values. The current price at the moment of placing the EA is not the current price in any other time. It is the initial price for determining where the quotes went before the first contract on the instrument was opened. For the second contract the initial price will be the opening price of the first contract. For the third one - the second, and so on and so forth.


The testing quality does not matter, as the EA:

  1. sends orders only at formed bars;
  2. does not trade by signals of any technical indicators, but only uses the current prices.

But if anyone has an itching, feel free to download the M1 history to the strategy tester starting from the Stone Age.

Complement community code with advanced automation from RobotFX.

7087

Best MetaTrader Indicators + Profitable Expert Advisors