Twinlane Copier

Twinlane Copier copies positions and pending orders from one MetaTrader 5 terminal to one or more other terminals that run on the same PC or VPS. The same EA works as Master or as Slave, and the terminals exchange a small snapshot file in the shared common folder. No DLL, no web request, no account passwords.

It is built so that a copied trade is never opened twice: every copy carries the master ticket in its comment, the slave checks open positions and orders before it sends anything, and a state file survives restarts. The panel on the chart shows the connection, the delay in milliseconds and every copied trade with master and slave ticket.

Three problems it is built to avoid

1. Duplicate positions. The slave marks each copy with the master ticket (comment "TL" plus ticket) and checks existing positions and pending orders first. A restart of the terminal, a lost connection or a repeated order request does not create a second copy. A trade that you close by hand on the slave stays closed and is not opened again.

2. Wrong lot after a partial close. When the master closes part of a position, the slave closes the same share of its own position. The share is taken from the master volume ratio at the time of copying and rounded to the volume step of the slave symbol. The remaining part stays open and follows the master.

3. Difficult setup. Four steps and one channel name. Symbol names such as EURUSD.pro, EURUSDm or XAUUSD.r are matched automatically. A manual list handles names that differ completely, for example GOLD and XAUUSD.

Functions

Master:

  • Writes a snapshot of all open positions and pending orders to a temporary file and then renames it, so the slave never reads a half written file.
  • Each snapshot carries a sequence number and a heartbeat. After every change a second confirmation snapshot follows after about 150 ms.
  • Does not republish trades that are copies themselves.
  • Panel shows sequence, write errors, published trades and slave accounts that answer with an acknowledgement.

Slave:

  • Compares the snapshot with its own trades (target against actual) and opens, changes or closes trades to match. A trade is closed only after it is missing in two different snapshots.
  • No action at all when the master heartbeat is older than the timeout (default 10 seconds). Trades stay open, nothing new is copied, and the panel turns red.
  • Five lot modes: Fixed lot, Master lot x factor, Proportional to balance, Proportional to equity, Own risk percent of equity by the distance to the stop loss.
  • Stop loss and take profit are copied and follow later changes, either as distance from the own entry price or at the same price level. Broker stop level and freeze level are respected.
  • Pending orders are copied, moved and deleted with the master. Expiry is converted between server times.
  • Reverse copy (buy becomes sell, stop loss and take profit swap sides, limit orders become stop orders).
  • Symbol mapping: exact name, manual list, prefix and suffix rules, and automatic matching.
  • Filters by master symbol (allow list, deny list), master magic number, direction, maximum age of a trade, maximum price difference to the master entry, and a daily time window.
  • Protection: stop new copies at a daily loss percent (optionally close copied trades), maximum number of copied positions, margin check before every order.
  • Execution: filling mode is chosen from the symbol and switched automatically after an invalid fill. Requotes, timeouts and connection errors are retried with a pause. Failed trades are retried every two seconds and given up after eight attempts.
  • Existing master trades at the moment the slave starts are not copied unless you switch on "Copy trades that were open before the slave started".

Panel (chart): role, connection state, heartbeat age, delay in ms, last copy time, counters for copied, closed, partial, skipped and error, list of copied trades (master ticket to slave ticket), on and off switch, collapse button, English or German, adjustable scale.

Strategy Tester: copying between terminals cannot run inside the tester. In the tester the EA runs a built-in self-test. It builds a simulated master snapshot and lets the real slave code open small trades, close part of them, change stop loss and take profit, place and delete a pending order and close the trades. No files are written in the tester.

Quick start

1. Install the EA on both terminals and allow algorithmic trading. Both terminals must run on the same Windows PC or VPS under the same Windows user.

2. On the master terminal open any chart and attach Twinlane Copier with Role = Master and a channel name, for example Main. Do not change the master account's trading.

3. On each slave terminal attach Twinlane Copier with Role = Slave, the same channel name and your lot mode. The slave account must be a hedging account.

4. Check the panel: a green dot and a heartbeat age below one second mean that the connection works. Test with a small trade on a demo account first.

FAQ

Does it work between different PCs? No. Both terminals must be able to read the same common folder, so same PC, same VPS or same Windows user. It does not work on the built-in MQL5 VPS because the terminals there cannot share files.

Does it work on netting accounts? The master may be any account type. The slave must be a hedging account. The EA stops with a message on a netting slave.

Can I copy from MT5 to MT4? No. MT5 to MT5 only.

How many slaves? Any number of slave terminals, each with its own settings. Each slave terminal needs its own EA instance. Activations: 10 per purchase.

What happens if the master terminal closes? The heartbeat stops. After the timeout the slave does nothing. Open slave trades keep their stop loss and take profit.

Why was a trade not copied? The panel footer shows the last reason, for example lot below minimum, symbol not found, not enough margin, trade too old or filtered.

Can I use my own EAs on the slave account? Yes. Copied trades use their own magic number (input "Magic number of copied trades"). Other trades are not touched.

Input parameters

General

  • Role of this terminal: Master or Slave
  • Channel name: must be equal on master and slave
  • Panel language: English or Deutsch
  • Show status panel
  • Panel scale (0.7 to 2.0)
  • Timer interval in ms (20 to 1000, default 50)

Slave sizing

  • Lot mode: Fixed lot, Master lot x factor, Proportional to balance, Proportional to equity, Own risk % by stop loss distance
  • Fixed lot (also used in risk mode when the master trade has no stop loss)
  • Factor
  • Own risk % of equity
  • If computed lot is below the minimum lot: round up or skip
  • Maximum lot per copied trade

Slave behaviour

  • Reverse copy
  • Copy pending orders
  • Copy stop loss, Copy take profit
  • How SL/TP are transferred: distance from own entry or same price level
  • Follow later SL/TP/price changes
  • Copy trades that were open before the slave started
  • Magic number of copied trades
  • Max deviation in points, Retries, Pause between retries
  • Master heartbeat timeout in seconds

Symbol mapping

  • Manual list (example: XAUUSD=GOLD;US30=DJ30.cash)
  • Automatic prefix/suffix matching
  • Master prefix and suffix to remove, slave prefix and suffix to add

Filters

  • Only these master symbols, Never these master symbols (lists, separator semicolon, trailing * allowed)
  • Only these master magic numbers
  • Direction filter
  • Max age of a master trade in seconds
  • Max price difference to master entry in points
  • Time window for new trades (slave server time)

Slave protection

  • Stop new copies at daily loss percent, optionally close copied trades
  • Max open copied positions

Master

  • Heartbeat interval in ms

Honest limits

  • Same PC, VPS or Windows user only. No cloud, no remote copying.
  • MT5 to MT5 only. The slave account needs hedging.
  • Stop-limit orders are not copied. Master trades that are older than the maximum age are skipped on purpose.
  • Prices at the slave broker differ from the master broker. Delay, spread and slippage mean that copies are not identical to the master trades.
  • The file is checked about every 50 ms, so the usual delay is well below one second, but it depends on your PC and broker.
  • A copier does not make a strategy profitable and gives no guarantee of results. Test on a demo account first and check lots and stops on the slave before using real money.
Mais do autor
Lotwise Risk Console works out the lot size from the risk you choose and the stop loss line you drag on the chart. You click Buy or Sell, and the manager can then look after the open position: break-even, partial closes, trailing, time exit. It never opens a trade by itself. It takes the lot calculation off your hands for every order. Example on a 10,000 USD account: 1 % risk and a stop of 191 points give 0.51 lot on EURUSD. The panel shows the money at risk (97.41 USD) and the possible gain at
Limitline Prop Monitor shows the limits of a funded or challenge account in one foldable panel on the chart and warns you before a limit is reached. If you enable the trade brake or the emergency stop, it can also close trades and delete orders that would break a limit. It does not open trades by itself. The reason I built it: the daily loss limit usually resets at the firm's own time, not at broker midnight, and open stops and pending orders count too. The panel does that arithmetic for you. In
Event Window Manager reads the economic calendar that is already built into your terminal and opens a protection window around important events. Inside the window it can warn you, block new trades, delete and later restore pending orders, and close positions or move them to break-even. Your other EAs can ask for its state through global variables. It needs no DLL, no WebRequest and no website. The calendar comes through your broker connection. One instance on one chart covers the whole account,
Magic Atlas Journal reads the closed positions of your account and sorts them by magic number, symbol, calendar day, weekday and entry hour. You see profit factor, win rate, drawdown and expectancy for each EA without a spreadsheet. It only reads history and places no orders on a live account. I use it when several EAs run on one account and the broker statement only gives one total. A profitable account can hide one EA that has been losing for weeks, and a flat account can hide one that works.
Magic Atlas Snapshot reads the closed positions of your account and shows net profit, win rate, profit factor, maximum drawdown and expectancy for each EA. It covers the three magic numbers with the most closed positions. It only reads history and places no orders on a live account. Magic Atlas Snapshot is the reduced version of Magic Atlas Journal. Same source, with the extra views and reports removed. Three problems it solves 1. Several EAs on one account and no idea which one earns. 2. Broker
FREE
Fleetdeck shows the state of every MetaTrader 5 account that runs on your computer in one panel on one chart. You see total equity, profit of the day and week, open risk and the health of each account at a glance, and you get an alert when something is wrong. Fleetdeck only reads. It never opens, closes or changes a trade. Problems it solves You run several terminals (own accounts, funded accounts, demo) and have to switch windows to see how they are doing. An account goes offline, or Algo Tradi
Magic Brake
Markus Hentschel
Magic Brake watches every EA on your account, one row per magic number. It scores each EA from 0 to 100, tells you why, and, if you want it to, brakes only the EA that misbehaves: it closes its new trades, closes all of its trades, or sets the stop loss it forgot. Default mode is warn only. Problems it solves 1. You run five or ten EAs on one account. One of them starts doubling its lot after every loss or piles up a grid, and you only see it when the account equity has already dropped. 2. Some
Twinlane Copier One copies positions from one MetaTrader 5 terminal to one other terminal on the same PC or VPS. The same EA works as Master or as Slave. The terminals exchange a small snapshot file in the shared common folder. No DLL, no web request, no passwords. Twinlane Copier One is the reduced version of Twinlane Copier. It has no time limit. It is limited in these points: One slave account (the master binds itself to the first slave that answers). Lot mode: master lot multiplied by a fact
FREE
Fleetdeck Account Overview is the reduced version of Fleetdeck Multi Account Monitor. It shows up to three MetaTrader 5 accounts that run on your computer in one panel on one chart: total equity, profit of the day and week, open profit and a traffic light for each account. It only reads and never opens, closes or changes a trade. Problems it solves You run several terminals and have to switch windows to see how they are doing. An account goes offline or Algo Trading is off after a restart, and y
FREE
Daymark Chart Companion puts the timing of your trading day on the chart: a candle countdown on five timeframes, the four trading sessions with their average range, the levels of the previous day, week and month, today's range against the daily ATR and your own event times. Everything sits in one calm panel and every part can be switched off. The indicator never trades. It is built for traders who plan entries around session opens, candle closes and key levels. Example from the screenshots: GBPU
Daymark Session Timer combines three small tools in one light indicator: a countdown to the candle close, the Sydney, Tokyo, London and New York sessions as soft boxes on the chart, and the previous day high and low. A small panel shows the countdown, which session is open, the spread and the server time. The indicator never trades. Two problems it solves 1. Session boxes in the wrong place. Brokers use different GMT offsets and change them with daylight saving, and the cities change on other da
FREE
Filtro:
Sem comentários
Responder ao comentário