Copying pending orders between MT4 and MT5: when the master's order fills first

17 November 2026, 17:33
Rimantas Petrauskas
0
5

Local Trade Copier (LTC) by Algonexis Technologies copies Buy Limit, Sell Limit, Buy Stop and Sell Stop orders between MT4 and MT5 accounts at the master's price, with SL/TP and expiration. When the master moves or deletes an order, the copy follows. There's one situation every trade copier user meets sooner or later: the master's order fills, and the copy at another broker is still waiting.

Tested with Local Trade Copier 3.1.10 on demo accounts, November 2026.

I have developed Local Trade Copier since 2010. Below is what LTC does in that situation, checked against the 3.1.10 source code, with the results of a test on two brokers.

How a pending order is copied

  1. LTC Client places the same order type at the same price on each client account. The lot size comes from that account's money management mode, and the symbol name from its symbol mapping.
  2. With PendingOrdersDelayForOneTake = -1 (the default), the order is placed first and the SL/TP are added right after. With 0 or more, LTC Client waits up to that many seconds for the SL/TP and places everything in one go.
  3. The expiration is copied. If the client broker refuses it, the copy is placed without one and deleted when the master's order expires.
  4. Moves, SL/TP changes and deletes on the master are copied.

Why a copy can be left waiting

A pending order fills when the broker's price reaches it, and two brokers never show exactly the same price. In the test, the master was an IC Markets MT5 demo and the client an FxPro MT5 demo, on Bitcoin. Prices differed by 10 to 70 USD between them that day.

The master's BUY LIMIT filled at IC Markets while the copy at FxPro was still waiting; Off keeps it waiting, Limit only or All buys at market

The master placed a BUY LIMIT at 65233.52 and a SELL STOP at 65219.33, 0.1 lot each, and the client copied both. At 13:09:58 IC Markets' price dipped and both master orders filled. At 13:11 FxPro's price was still 65300.93, so both copies were waiting:

MT5 Trade tabs: master BUY LIMIT and SELL STOP filled, client copies still waiting with MarketCopyIfMasterPendingFilled Off

FxPro's price reached them about a minute later, so both copies filled in the end. If the price had turned away instead, the client account would have missed the trade.

MarketCopyIfMasterPendingFilled (new in 3.1.10)

This LTC Client input sits below IgnorePendingOrders and OpenNonTriggeredPendingOrders :

LTC Client inputs: MarketCopyIfMasterPendingFilled options Off, All pending orders, Limit orders only, Stop orders only

Option When the master's order has filled and the copy is still waiting
Off (default) The copy keeps waiting for the client broker's own price.
All pending orders The copy is deleted and the trade is copied at market.
Limit orders only Buy Limit and Sell Limit copies go to market; stop orders keep waiting.
Stop orders only Buy Stop and Sell Stop copies go to market; limit orders keep waiting.

The market copy is made like any new copy: the same lot size rules, SL/TP, filters and price rule. Deviation Type decides how far from the master's price a market copy may open. The default is "Copy at any price"; "Copy if the price is within the range of X" sets a limit.

It acts only when the copy is still a pending order in the same direction as the master's filled trade. It isn't used while ShiftEntryPoints is set, on MT5 netting client accounts, or when AcceptNewTradeSignals is false.

The test with "Limit orders only"

With the input set to Limit orders only, the master placed a BUY LIMIT at 65060.13 and a SELL STOP at 65055.33, about 190 USD below the price, because FxPro needs Bitcoin pending orders to be at least 200 USD away. Bitcoin didn't fall that far in 90 minutes, so the master's orders were moved to the market price and filled. The client's Experts tab (master account number masked):

14:47:20 Master pending order #2090209746 was filled, but its copy #386570209 was still waiting for its price: the copy was deleted and the trade is now copied at market (MarketCopyIfMasterPendingFilled: Limit orders only). 14:47:20 COPIED new market order #2090209746 from server #xxxxxxxx as #386595873: BITCOIN BUY 0.100000 @ 65451.99

MT5 Trade tabs with Limit orders only: the client's BUY LIMIT copy became a market BUY, its SELL STOP copy still waits

The BUY LIMIT copy became a market BUY within about a second of the master's fill. The SELL STOP copy kept waiting, because "Limit orders only" leaves stop orders alone.

Other pending-order inputs

  • IgnorePendingOrders (LTC Client): no pending copies; each trade is copied at market once the master's order fills. The same input in LTC Server applies to all clients.
  • OpenNonTriggeredPendingOrders : when LTC Client starts, it also copies pending orders the master already has.
  • DelayPendingOrdersForSeconds : waits that many seconds before placing a pending copy.
  • Filter By Trade Type : copies only the listed types (0 BUY, 1 SELL, 2 BUY LIMIT, 3 SELL LIMIT, 4 BUY STOP, 5 SELL STOP).
  • MaxTrades counts open positions and pending orders together.
  • MT5 Buy Stop Limit and Sell Stop Limit orders have no MT4 equivalent, so they're copied to MT5 accounts only. The four regular types copy in all four MT4/MT5 directions.

The full tutorial, with setup steps and an FAQ, is on mt4copier.com: Copy pending orders between MT4 and MT5.

Rimantas Petrauskas has built trading tools for MetaTrader traders since 2009 and created Local Trade Copier in 2010.