LokalSyncTraderX

Local multi-account trade copying & execution system for MetaTrader 5

A system I developed for the synchronised execution and distribution of trades across several MetaTrader 5 accounts. It makes parallel trading, trade copying and hedge structures possible across several terminals — locally, under control, and without executing every trade on every account by hand.

The problem

Running several accounts side by side by hand does not scale. Every order has to be placed again on every terminal, opposing positions have to actually face opposite ways, and the settings behind them have to match.

The mistake that costs money is not the order you miss. It is the half-finished one: one account is in the market, the other is not.

Architecture

The same Expert Advisor runs on every participating terminal. One of them sets the instruction, the others follow it. They talk to each other locally — there is no server in between and no connection leaving the machine.

The whole group is operated from one place, directly on the chart. Instead of placing every order on every account separately, it is triggered once and distributed.

Synchronisation

Before an order is triggered, the whole group has to confirm that it can go along. If one confirmation is missing, the plan expires unused.

  1. The lead account triggers an order
  2. Every participating account reports whether it can follow
  3. If one confirmation is missing, nothing is executed
  4. Each account has its direction fixed: same way or opposite
  5. Orders are mirrored, pending limits included
  6. Closing applies to the whole group

An account left alone in the market costs more than an order that was never triggered.

Hedge and parallel execution

A triggered trade is not simply duplicated, it is distributed. For each account it is fixed in advance whether it follows the lead account in the same direction or deliberately takes the opposite one.

  • Same direction: the same position on several accounts at once
  • Opposite direction: a hedge structure spanning two or more accounts
  • Mixed: every account carries its own direction, independently of the others
  • On market and limit orders, the following account derives its direction from the order itself

The direction is checked per account against its own reference, not across the group as a whole — otherwise a misconfigured account can quietly run in the same direction as the lead when it was supposed to stand against it.

Control

Before anything is executed, the group is checked as a whole. Whatever is blocking is stated in plain words on the chart — not as an error code, but naming the account it hangs on.

  • Each account works out in advance whether the position is fundable there at all. If one says no, the group stays put.
  • Each account's settings are checked against the lead account's, not against its neighbours — otherwise one misconfigured terminal drags the correct ones down with it.
  • No account is shown green while the same check is blocking it. That sounds obvious and is the failure mode a safety display fails in.
Control panel of LokalSyncTraderX on the chart: one card per account, each with the direction fixed for it, above them the shared group settings and below them the system status
The panel with a group running: one card per account, each carrying the direction fixed for it — here the lead account short, a following one long on its own symbol — with the shared settings above and the state of the group below.

Technical implementation

  • Every position carries a key to its counterpart, so the monitoring closes exactly the position that belongs to it — not just any one of them.
  • When an imbalance is detected, a grace period comes first, then the targeted resolution of that single position. Shutting down the whole group is the last step, not the first.
  • Across different brokers, prices are not copied verbatim but converted through a shared reference point. Without that reference, nothing is placed.
  • The copier recognises its own orders and leaves trades placed by hand alone.
  • Every new status field falls back to the previous behaviour when it is missing — terminals can never all be updated in the same second.

Where the limit is

The system has no strategy and produces no signals. It controls how an order is executed, not whether it is worth taking. Trading several accounts at once multiplies the outcome in both directions.

The safeguards above are layers, not a guarantee. They exist because each of them once had a real incident behind it, and they resolve a detected case on their own — but they depend on running terminals, a running machine and a reachable broker. If you read the word "guaranteed" anywhere here, you did not read it from me.

Why it exists

It started from my own need to run several accounts at the same time without placing every order twice. What began as a copy function grew a new check after each incident in real operation — most of the rules above stand for a case that actually went wrong once.

Each of those rules is written down as an invariant, together with what it prevents. That is the part that takes the time: not writing a copier, but making sure a later rebuild does not quietly remove the reason one of its lines exists.

Technologies

  • MQL5
  • MetaTrader 5
  • Trade Copying
  • Multi-Account
  • Execution
  • Automation

Current status

In daily use across my own terminals and extended as new requirements come up. It is a tool for my own execution rather than an off-the-shelf product — but the same principle can be built for a specific setup.

Writing a copier is quick. What is hard is what happens when one side drops out.