Tandem Local Trade Copier MT5
- Utilities
- Version: 1.1
Tandem is a local trade copier for MetaTrader. It copies trades between terminals that run on the same computer or VPS: from MT4 to MT4, MT4 to MT5, MT5 to MT5 and MT5 to MT4. There is one version for each platform, and the two work together.
I built it around a single Expert Advisor for both sides. You attach it to a chart in each terminal, click MASTER on the account that trades and leave SLAVE on the accounts that should follow. As long as they use the same channel number, the slaves pick up the master's trades within a fraction of a second. Everything goes through a small file in the common folder of the terminals, so there is no DLL, no server and nothing to set up in Windows. Algorithmic trading has to be allowed in each terminal, and the terminals have to run under the same Windows user.
The copier follows market positions and pending orders, their stop loss and take profit, later changes to stops and pending prices, partial closes and full closes. If you close a copy yourself, or it reaches its own stop or target, it stays closed.
The lot size can match the master, be multiplied, be fixed, scale with the balance or equity of the two accounts, or be worked out from a risk percentage and the stop loss. You can also put a cap on it. When the broker names symbols differently, there is a symbol map (GOLD=XAUUSD, for example) and a setting for prefixes and suffixes, and in most cases the copier finds names like EURUSD.m by itself. Copies can be reversed, and you decide which directions, order types, symbols, magic numbers or comments are copied.
A few things mattered to me while writing it. A slave never closes a trade just because it lost contact with the master; it closes only when the master's current list of trades no longer has that trade. If the master terminal is logged into a different account, the slaves keep their copies and wait for you to confirm the new master. If two masters end up on the same channel, both panels say so. Trades opened by the copier are not passed on again, so two accounts cannot copy each other in a circle.
On the slave side you can limit the price difference to the master's entry, the delay, the spread and the number of open copies, and you can set a daily loss limit and a floating loss limit that either stop new copies or close them. The master shows a list of its slaves with balance, equity, open copies and state, and you can limit how many slaves may follow it.
Almost everything is set on the panel, which is available in eleven languages. Only a few things are inputs: the magic number of the copies, the optional filters, symbol names and the check interval, which is 200 milliseconds by default.
A note on testing: copying needs two terminals running at the same time, so it cannot be shown in the Strategy Tester. A MetaTrader 5 account that receives copies has to be a hedging account; a netting account can be used as the master.
