The Internet Trade Mirror duplicates orders over the internet between copies of MT4 and MT5 on different computers. Senders can control which trades are broadcast. Receivers can control which trades are copied, and can change the lot sizing and risk settings.
The Internet Trade Mirror duplicates trades over the internet between copies of MT4 or MT5 running on different computers. A sender places trades in one copy of MT4/5, and these are replicated almost instantly in receiver copies of MT4/5.
The Trade Mirror uses the same fundamental copying technology as FX Blue's hugely popular Personal Trade Copier.
Subscribers can control lot sizing and risk, can restrict the trading to particular symbols, and can even invert the original direction of the sender's trades.
The speed of copying depends almost entirely on network latency, and is therefore principally determined by geographical location and the speed of light. Slippage will usually be minimal - allowing, of course, for any differences in price and spread between the sending and receiving brokers - and slippage can in fact often be positive as well as negative.
Unless otherwise specified in writing by FX Blue, this software is licensed for personal use only. You are not allowed to distribute it to other people, regardless of whether or not money is changing hands. You only have a licence to use the software if you, personally, downloaded it from our website.
Therefore: you should download this Receiver software yourself from the FX Blue website. You do not have a licence to use it if you have been given a copy by your signal sender, without you registering with FX Blue.
The software is provided entirely at the user's risk, and you should check it thoroughly before deploying it on computers trading real money. FX Blue accepts no responsibility whatsoever for any loss of any kind caused by installation or use of the software.
FX Blue cannot answer queries about the trading activity of any users who you are mirroring. Please contact the sender of signals for any support about using the Receiver EA to copy their trades.
No, you cannot log in a receiving account using the read-only "investor" password. The read-only account cannot place trades. The Receiver EA will get signals from your sender, but will not be able to copy them.
By default, the copier will not necessarily trade the same lot size on the receiver as on the sender. Its standard behaviour is to adjust the lot size based on the relative equity of the two accounts.
If you want to trade exactly the same lot size as your signal sender, even though this may imply very different levels of risk on the sender and receiver accounts, then you need to do the following:
Turn off UseRiskFactor by setting it to zero
Set LotSizeMultiplier to 1
Please see the section of this guide about lot sizing for more information.
The Trade Mirror is cross-broker and broker-independent. It works by placing trades through a running copy of MT4 or MT5, not directly onto a broker account - which would require each broker's co-operation and would no longer be independent.
So, the Mirror requires a permanently-running copy of MT4/MT5. These can be on your home PC, but it will often be more convenient to use a VPS instead.
If you are going to use a VPS, it must be a proper real VPS, not the shared hosting offered by some brokers. Please see our article about the different types of VPS.
Our partner ForexVPS.net offers special discounts to FX Blue users.
To install the receiver EA, run the setup program. You can choose one or more copies of MT4/5 where you want to install the EA. If any copies of MT4/5 are not shown, you can add them to the list using the "Find MetaTrader" button.
You need to restart MT4/5 in order for its Navigator list to update - or you can right-click over the Navigator and use the "Refresh" option.
In order to receive signals through the Trade Mirror you need an account with FX Blue, and the sender must have added your account to their list of subscribers.
You can see which senders have added you as a subscriber using the FX Blue website:
A sender can remove you from their list of subscribers at any time. If this happens, the Receiver EA will no longer manage any open positions from that sender. You can also use the FX Blue website to remove yourself from a sender's list of subscribers.
You open a new chart for any symbol and add the "FX Blue - InternetMirror Receiver" EA to the chart, by double-clicking on it in the MT4/5 Navigator list or dragging it onto the chart.
You do not need to run multiple copies of the EA on charts for each symbol which is going to be traded. A single copy of the EA will trade all symbols from the sender.
You do need to run a separate copy of the EA for each sender whose trades you want to mirror. A single copy of the EA only mirrors the trades from one sender.
In MT4, you can also optionally run copies of the Receiver-Worker EA. This can allow MT4 to copy trades faster by processing multiple actions at once.
You must turn on or fill in the following information when adding the Receiver EA to a chart:
All the EA's other parameters can be left at their default settings, but you may want to change things such as the lot-sizing mode.
Communication between the Sender and Receiver EAs takes place via a message hub. In future FX Blue will offer a choice of hubs in different locations. For example, a hub in Australia will offer faster trade copying if you and your signal sender are located in Australia.
You can choose which hub to use via the MessageServer parameter in the Receiver EA. You must use the same setting which the sender is using. If you and your sender are using different hubs then no heartbeats or trading messages will be received.
As explained above, you need to run a separate copy of the receiver EA for each sender whose trades you want to copy.
However, you cannot use the same set of receiver details more than once. If you have multiple copies of the Receiver EA using the same Channel and Username parameters, then you will get either error message #12 or #2005.
If you are running multiple instances of the EA, then you can make it easier to distinguish between them by giving them different chart background colours and a different description.
The following screenshot shows the Receiver EA running successfully:
(The full-chart background is designed to reduce support queries from new MT4/5 users who otherwise try to run more than one EA on the same chart. The colour can be changed using the BackgroundColour setting.)
Shortly after receiving the first tick on its chart, the Receiver EA should connect to FX Blue's message hub. If the sender's EA is running, then a "heartbeat" message should be received within 30 seconds, and the Receiver EA's status will update. Any trades will then be copied as soon as they are placed by the sender.
If no heartbeat message is received, then it means that the sender's EA is not currently running.
The EA displays its current status in the top-left of the chart. If no status is visible, please check the diagnostic information.
For help and support, please contact the sender of your trading signals.
FX Blue provides the Mirror as a free service on the basis that signal senders are responsible for handling support requests from their subscribers. We cannot answer support queries from users of the Mirror Receiver.
In most cases you can move the Mirror Receiver to a new computer simply by installing the software on that computer; shutting it down on the old computer; and starting it up on the new one. You will need to wait a few minutes before you can start using the Receiver on the new computer.
If you have turned on the UseOriginalOrderComments setting then, as described below, you will also need to copy the contents of the MQL\Files directory from the old computer to the new one. If UseOriginalOrderComments is turned on, then the relationship between ticket numbers on the sender and receiver has to be tracked using a file on disk, and this must be transferred to the new machine.
You can test the new computer by logging in to MT4/5 using the read-only investor password. This will prevent it being able to open or close trades. You can use this to check that the connection to the sender is successful, and that it is not trying to close any existing open positions, and then log back in using the normal master password once satisfied.
The sender issues a message as soon as there is a new open order on its account. Receiver EAs will then attempt to place the same trade.
The same applies to trade closure. As soon as the sender closes a position, it tells the Receiver EAs to close their trades.
Messages are sent to receivers via FX Blue's message hub. The speed of copying depends almost entirely on the latency to the message hub and to your broker. Differences in price between you and the sender can be caused both by the latency in receiving signals and also price and spread differentials between different brokers. You may need to adjust the slippage tolerance in order to trade successfully.
Once the receiver gets a signal from the sender, it should make a request to its own broker almost immediately. The overall speed of trade copying is controlled almost entirely by the speed of trade placement by the broker (including network latency to the broker), not by the internal speed of the copier.
The copier's logs will show where any delays are occurring. The copier will record the following process:
Message arriving in the receiver from the sender
Instruction by the receiver to its broker
Confirmation of the new trade on the receiver by the broker
However, there is a special consideration in MT4 (only, not in MT5). Unless you use the optional Receiver-Worker EA, MT4 can only carry out one trading action at a time, and the receiver EA cannot do anything else while it is waiting for the broker to accept or reject an instruction. If two new signals arrive in the MT4 receiver simultaneously, the receiver EA cannot start working on the second one until its broker accepts/rejects the first one.
The stop-loss and take-profit on the receiver's trade are only a safeguard in case the connection with the sender is lost. Under normal circumstances, the receiver's trade will be closed as soon as the sender's trade is closed. The receiver's s/l and t/p are only used if either (a) the connection with the sender is lost and no close instruction is received, or (b) price differences between brokers mean that the receiver's s/l or t/p is hit before the sender's s/l or t/p.
As a result, please note the following:
The optional FixedSLPips and FixedTPPips parameters specify a maximum value for the stop-loss and take-profit. Trades can still be closed when the sender's trade is closed, before the s/l or t/p is hit on the receiver.
The cash-risk lot-sizing modes therefore specify a maximum cash risk (because they use the sender's stop-loss or FixedSLPips). The s/l controls the maximum amount of money which the receiver can lose, but the receiver's trade can still be closed at any time and at any profit/loss, when the sender's trade is closed.
If you want the receiver to ignore trade-closure on the sender, and only to close trades when the s/l or t/p is hit on the receiver, then turn on the IgnoreAllExitSignals parameter.
By default, there is a limit on the price difference which the copier will accept between the sender's price and the receiver's price - controlled by the AllowSlippagePips setting.
If the price difference between the sender and receiver is larger than this, the receiver will try to get the sender's price by placing a pending limit order instead of buying or selling at market. Note: the broker can have a restriction on the minimum distance between a pending entry and the current market price. A trade can be rejected (MT4 error #130) if the price difference is larger than AllowSlippagePips but smaller than the broker's stop-level.
You can change the copier's behaviour in three ways:
Increase or decrease the AllowSlippagePips tolerance
Turn off the PlaceLimitOrderIfSlipped setting in the receiver. If the price difference between sender and receiver is larger than AllowSlippagePips, the receiver will reject the trade rather than trying to place a pending order.
Turn on TradeAllOrdersAtMarket in the receiver. This tells the receiver to ignore the AllowSlippagePips setting, and to accept any price difference between sender and receiver.
N.B. The heartbeat period does not control how quickly orders are copied. Open and close messages are always sent immediately, and processed as quickly as possible.
The sender issues a periodic "heartbeat" message, every 30 seconds by default. This states which orders should still be open. If the Receiver EA misses a trade-closure instruction, e.g. because your copy of MT4/5 is not running at the time, then it should close the order when it next receives a heartbeat from the sender.
Changes to a trade's s/l or t/p are also sent in the heartbeat message. Therefore, there may be a delay of up to 30 seconds between the s/l or t/p changing on the sender and the Receiver EA making the change. However, if the trade is closed out on the sender within those 30 seconds because the s/l or t/p is hit, that should lead to an immediate close instruction being sent to the receiver.
Changes to the entry price on a pending order are also sent in the heartbeat, and therefore updated within 30 seconds.
By default the trade copier does not send pending orders. It only sends a message to the receiver once a pending order is filled and turns into a buy or sell order.
Copying pending orders can be disadvantageous and dangerous. We recommend that senders do not do this (and pending orders will fail if using the Copier to send trades to platforms other than MT4/5).
For example, let's say that the sender is trading the breakout of yesterday's range, and there is a buy-stop at yesterday's high. This could get triggered on the receiver without being triggered on the sender, because of either slight price differences between the two accounts, or wider spreads on the receiver. If the price then retraces, the sending copy of MT4/5 will be unaware that the receiver has a trade which needs to be managed, but the receiver will have an ever-increasing loss and will not be receiving any instructions to close the position.
However, senders can nevertheless configure their EA to send pending orders. Receivers can then use the RequireSenderFillWithinMinutes parameter to limit the risk at their end. If the receiver's order is filled, but the sender's order remains pending, then the receiver can be configured to close its order after this number of minutes (ignored if zero).
The software's default settings (UseRiskFactor=1) will trade the same relative lot size on the sender and receiver. For example: the sender trades 0.50 lots and has equity of $10,000; the receiver has equity of $2000 and trades 0.10 lots.
The software has several different lot-sizing modes which you can choose from, using the following settings. Only one of these settings should be non-zero. These are processed in order: for example, EquityPerLot is only used if UseFixedLotSize, UseRiskFactor and LotSizeMultiplier are all set to zero.
UseFixedLotSize
UseRiskFactor
LotSizeMultiplier
EquityPerLot
BalancePerLot
CashRiskFixed
CashRiskEquityPercent
CashRiskBalancePercent
NotionalDepositVolume
To repeat: only one of the above settings should be turned on. All the other values should be set to zero.
You can trade a fixed lot size on all orders, regardless of what volume the sender trades, by using the UseFixedLotSize parameter (and turning off the other modes). For example, setting UseFixedLotSize to 0.25 will trade 0.25 lots on every order regardless of whether the sender trades 0.25, 0.01, 1.53 etc.
You can trade a multiple of the sender's lot size using the LotSizeMultiplier parameter (and turning off the other modes). For example, a value of 0.5 means that the receiver will trade half the sender's lot size, and a value of 3 means that the receiver will trade triple the sender's lot size.
A value of 1 for LotSizeMultiplier (and turning off the other modes) means that the sender and receiver trade exactly the same lot size.
Please note that trading the same lot size does not mean that the Receiver EA is taking the same amount of risk. For example, the sender and receiver both trade 0.10 lots, but the sender has equity of $5000 and the receiver has equity of $2500. The receiver is taking double the risk of the sender.
You can trade the same relative lot size on the sender and receiver using the UseRiskFactor parameter (and turning off the other modes). This is the software's default setting.
A value of 1 for UseRiskFactor means that the lot size will be adjusted between the sender and receiver based on their relative equity (converted to US dollars on both sides, if necessary). For example, if the sender has equity of $5000 and trades 0.20 lots, then you will trade 0.10 lots if you have equity of $2500.
You can adjust the relative risk by increasing or decreasing UseRiskFactor; a value of 1.5 means that you will take 50% more risk than the sender.
For example, if the sender's equity is $2000 and your equity is $4000, and UseRiskFactor is set to 1.5, then you will trade three times the lot size of the sender - i.e. 4000 / 2000 x 1.5 = 3.
You can trade a fixed lot size in the Receiver EA based on your equity or balance, ignoring the sender's lot size, using the EquityPerLot or BalancePerLot parameter (and turning off the other modes).
The EquityPerLot parameter specifies how much equity you must have in order to trade 1 whole lot (and the BalancePerLot carries out the same calculation in relation to the balance instead of the equity).
For example, if EquityPerLot is set to 50000, and your current account equity is 10000, then the Receiver EA will trade 10000 / 50000 = 0.20 lots.
You can configure the receiver to risk a specific cash amount, or a percentage of your account, using the CashRiskFixed, CashRiskEquityPercent, or CashRiskBalancePercent parameter (and turning off the other modes).
CashRiskFixed: specifies a fixed cash amount to risk per trade, e.g. $100
CashRiskEquityPercent: specifies a percentage of your account equity to risk, e.g. 2.5%
CashRiskBalancePercent: specifies a percentage of your account equity to risk, e.g. 2.5%
In order to use any of these settings, the sender's order must have a stop-loss, or you must override this by using the FixedSLPips parameter to set your stop-loss on each trade.
The receiver then adjusts the lot size of the trade so that hitting the stop-loss causes no more than the specified cash risk.
For example:
You set CashRiskEquityPercent to 1 (meaning 1% of your equity).
Sender's stop-loss is at 50 pips from entry (or you set FixedSLPips to 50).
Your account equity is $10000.
The receiver calculates that a 50-pip stop-loss represents a loss of $500 per whole lot.
You have asked to risk 1%, i.e. $100 of your equity
Therefore, the receiver trades $100 / $500 = 0.20 lots, risking a maximum of $100 if the s/l at 50 pips is hit.
Please note that these risk settings are maximums: trades can be closed at any time when the sender's position is closed, before the fixed stop-loss is hit.
The software automatically handles "micro" and "mini" MT4/5 accounts (where the lot size is 10K or 1K instead of the usual 100K).
The software cannot automatically detect "cent" accounts (where the lot size is 100K, but meaning 100,000 cents rather than $100,000). By default, the receiver's lot sizes will be 100 times too large on these accounts. You can either turn on the CentAccount setting, or you can divide the values for UseRiskFactor or LotSizeMultiplier by 100 (e.g. setting them to 0.01 instead of 1.00).
Conversion using settings such as UseRiskFactor or LotSizeMultiplier can lead to a lot size which is smaller than the broker's minimum. The receiver will not place these trades unless you turn on the RoundUpToBrokerMinimum setting. (This rejection will be included in the information which is written to the MT4/5 Experts log.)
In addition, you can use the MaxLots and MinLots parameter to put a cap on the lot sizes which the Receiver EA trades. For example, setting LotSizeMultiplier to 2 with MaxLots set to 0.50 means "trade double the sender's lot size, but never more than 0.50 lots".
Symbol names are not standardised and can vary between broker accounts. For example, the EUR/USD fx pair may be EURUSD on one account and EURUSD.xyz on another. An equity index such as the DAX may be referred to as DE30, GER30, .DAX, .DE30, [GER30] etc.
In addition, some accounts may contain more than one version of each market on their symbol list - for example, both EURUSD and EURUSD+. When it receives a trade for EUR/USD, the copier needs to know which symbol it should use - and which version, if there is more than one.
The copier should almost always be able to handle fx pairs without manual overrides to its settings
The copier will often be able to handle metals, oil, and equity indices, but may require manual overrides to its settings
Other markets, particularly individual equities such as Apple or Google, will almost always require manual overrides unless you are copying between two accounts of the same broker.
FX pairs are handled by the ForexSymbolSuffix setting. The copier can usually auto-detect this, and it will tell you if it cannot. If you are changing this setting manually, you need to use the suffix for the fx symbols which you want to trade. For example, if you want to trade EURUSD.xyz, GBPUSD.xyz etc, then you set ForexSymbolSuffix to .xyz
Non-fx markets require entries in the CustomSymbolMappings list. This tells the copier how to translate from symbol names on the sender account to symbol names on the receiver account. For example, if the sender's name for the S&P 500 index is SPX500 and the receiver's version is .US500, then the entry to add to CustomSymbolMappings is:
SPX500=.US500
By default, the software will use a pip-size definition based on the number of digits which the broker quotes in the price. For example, if the price is quoted to 2 or 3 decimal places then the software will use a pip size of 0.01.
You can override this for specific symbols using the CustomPipSizes setting. For example, you can set this to XAUUSD=1,GER30=1 to use a pip size of 1.00 on XAUUSD and GER30.
Entries in the CustomPipSizes list must exactly match the full symbol name on the receiver account (including any suffix).
The software will automatically convert between normal and "mini" accounts (where the lot size for forex symbol is 10,000 rather than the usual 100,000).
However, some brokers have different contract sizes for CFDs. One broker may have a contract size for GER30 (Dax) of 1 whereas another has a contract size of 0.01. You can adjust the volumes from the sender for specific symbols using the CustomLotMultipliers setting.
For example, if the sender's DAX and CAC40 contracts are 100 times smaller than the receiver's contracts, then the following setting will adjust the calculation on the receiver to make the trades 100 times smaller. Entries in this list must exactly match the full symbol name on the receiver account, including any suffix:
DAX=0.01,CAC40=0.01
(Legacy information: some brokers use "market execution" where, in the past, it was necessary for an EA to send a trade and then send a separate instruction to add any s/l and t/p. However, in all recent releases of MT4 and MT5, EAs should now be allowed to send the s/l and t/p as part of their order-open. As a result, the old CloseOrdersImmediatelyIfSLFails setting has been removed from the copier.)
The copier can be used with both hedging and netting accounts on MT5. However, netting accounts require an extra setting to be turned on in the copier.
The copier cannot be fully used with FIFO/non-hedging accounts on MT4, because MT4 does not have proper netting accounts. If the sender opens a buy ticket and then a sell ticket (or vice versa), the first trade will be successfully opened on the FIFO/non-hedging account but the hedged trade will fail.
The Receiver uses an order's magic number to identify which orders belong to it, versus which orders are from manual trading or other EAs running on the account. Therefore, magic numbers are not copied from the sender account.
The Receiver EA uses the same magic number for all orders which it processes. By default, it automatically selects a magic number based on the channel name. You can choose your own magic number by setting the MagicNumber parameter in the Receiver EA to something other than zero.
The sender and receiver EAs are capable of handling partial closes.
However, this relies on brokers using the standard functionality of MT4/5. Partial closes will not be processed properly by the copier if the broker deviates from standard MT4/5 functionality:
On MT4, the copier expects a partial close to be identified by the order comment (e.g. "from #12345678")
On MT5, the copier expects the ticket number of a position to be unchanged following a partial close (i.e. ticket number remains the same, with reduced volume).
The Receiver EA can be configured to invert the sender's trade direction, turning buys into sells and vice versa. (This feature has been included at user request; we are not aware of any loss-making trading system which can be made profitable by inverting it.)
In order to use this feature you need to turn on the Receiver EA's InvertTrades parameter, and you will also need to do one of the following:
By default, the receiver uses the MT4/5 order comment to track the ticket numbers on the sender account. You can change this behaviour, and get the receiver to use the original comments from the orders on the sender account, by turning on the UseOriginalOrderComments parameter in the receiver.
Alternatively, you can use the UseCustomOrderComment parameter to use a fixed comment for all orders.
However, please note that these parameters have implications for disaster-recovery. If you turn on UseOriginalOrderComments or UseCustomOrderComment, then the ticket numbers on the sender account are tracked using a file on disk (in MT4/5's MQL\files directory). If this file is deleted - or is unavailable for some other reason, e.g. because you are starting up MT5 on a new computer in an emergency - then the receiver will close all its orders because it can no longer link them to the sender's heartbeat.
The Copier can handle any order which can be placed through MT4/5. This includes binary options where the broker has a plug-in allowing you to place binary trades using the features in MT4/5.
However, brokers' binary option plug-ins for MT4/5 often use things such as the order comment to specify the expiry for the binary option. In cases such as these, you will need to turn on the UseOriginalOrderComments setting, as described above.
You can block the Mirror from placing new trades using a Global Variable in MT4/5 (press F3, or choose Tools / Global Variables).
You can use this either as a way of controlling the Mirror manually, by creating and removing the Global Variable yourself, or you can have an automated system which uses the Global Variable to turn the copying on and off based on something such as account equity or performance.
The Copier is controlled by a Global Variable called Suspend-X, where X is the channel name. For example: Suspend-MySender. If a variable exists with this name, regardless of its value (zero/non-zero) then the Copier will ignore new trade signals arriving from the sender.
You can also use global variables to control the lot sizes used by the Copier (completely overriding the Copier's standard lot sizing). There are two options: per-symbol settings, and a global override. A global variable in the form CopierLotSize-<symbol>, such as CopierLotSize-EURUSD+, sets a lot size for a specific symbol. The setting CopierLotSize-All overrides the lot size for all symbols which do not have their own setting.
Server settings | |
Channel | The FX Blue username of the sender whose trades you are copying |
MessageServer | The message hub to use. You must use the same setting as your signal sender. |
Username | Your FX Blue username |
Password | Your FX Blue password |
Local settings | |
ForexSymbolSuffix | Any suffix used by your broker for forex symbols. For example, if your broker refers to EURUSD as EURUSDcx, then this parameter can be manually set to cx. If left blank, the EA will attempt to detect any suffix which its broker uses. If you want the EA to use no suffix, and not to use auto-detection, then set the parameter to "none" or "(none)" |
CustomSymbolMappings | A comma-separated list of symbols which need special mapping between the broadcaster and receiver accounts. For example, GOLD=XAUUSD,CRUDE_OIL=OIL will convert broadcaster trades for GOLD into receiver trades for XAUUSD, and broadcaster trades for CRUDE_OIL into receiver trades for OIL. If the receiving broker uses a suffix such as cx, then this does need to be included in the mapping: e.g. GOLD=XAUUSDcx. |
CustomPipSizes | Lets you override the EA's default pip-size calculation for specific symbols (based on the number of digits in the price). For example, to use a pip size of 0.1 on gold and 1.0 on the DAX: XAUUSD=0.1,GER30=1 |
CustomLotMultipliers | Mainly for use on CFDs, where there can be differences in contract size between sender and receiver. Lets you adjust the volumes on specific instruments, before all other lot-size conversions are applied. For example, if the sender's DAX and CAC40 contracts are 100 times smaller than the receiver's contracts, then the following setting will adjust the calculation on the receiver to make the trades 100 times smaller. The symbol names in this list should be the exact symbol names on the receiver, including any suffix: DAX=0.01,CAC40=0.01 |
Accept/reject entry signals | |
IgnoreNewEntrySignals | If turned on, the EA ignores all new trade entry signals coming in from the sender - can be used to prevent the EA opening new trades, while continuing to manage existing ones. |
PermittedSymbols | If not blank, trades from the sender are ignored unless they are for symbols on this comma-separated list. This must exactly match the broker's names on the receiver account, including upper/lower case such as EURUSDfx,GBPUSDfx |
BuySellOnly | If non-zero, restricts the direction in which the copier will place trades. A value of 1 means that the receiver will only place buy orders; a value of 2 means that the receiver will only place sell orders. (Zero means that all orders are accepted.) |
IncludeTradingTimes | Ignored if blank. Otherwise, defines a list of times each day during which the receiver is allowed to trade; new order messages outside these times are ignored. See below for the format of this parameter. |
day_TradingTimes | Similar to IncludeTradingTimes, but defines separate permitted ranges for each day of the week |
IgnoreOrdersSmallerThanLots | Ignored if zero. If non-zero, specifies a minimum order size and the receiver will not trade orders which are smaller than this. This parameter is applied after converting the sender's trade volume using the lot-sizing parameters below. For example, if the sender's lot size is 0.5, and this translates to a receiver lot size of 0.3, then the limit is applied to the size of 0.3. |
IgnoreOrdersLargerThanLots | Ignored if zero. If non-zero, specifies a maximum order size and the receiver will not trader orders which are larger than this. This parameter is applied after converting the sender's trade volume using the lot-sizing parameters below. For example, if the sender's lot size is 0.5, and this translates to a receiver lot size of 0.3, then the limit is applied to the size of 0.3. |
MinSenderLotSize | Similar to IgnoreOrdersSmallerThanLots, but is applied against the sender's volume before adjusting it using settings such as UseRiskFactor. For example, if the sender's lot size is 0.5, and this translates to a receiver lot size of 0.3, then the limit is applied to the size of 0.5. |
MaxSenderLotSize | Similar to IgnoreOrdersLargetThanLots, but is applied against the sender's volume before adjusting it using settings such as UseRiskFactor. For example, if the sender's lot size is 0.5, and this translates to a receiver lot size of 0.3, then the limit is applied to the size of 0.5. |
MaxSpreadPips | Blocks new orders if the current spread on the symbol is wider than the specified number of pips. A value of zero disables this check on the spread. |
CheckForExistingPosition | Optionally prevents trading if the Receiver has an existing trade or pending order. You can configure the Receiver to ignore signals if there is any open trade or order for the same symbol, or more specifically if there is a trade or order in the same direction as the new signal. |
Accept/reject entry signals | |
IgnoreAllExitSignals | If turned on, the EA ignores all exit signals coming in from the sender - can be used if you want to manually control when trades should be closed. |
IgnoreExitSignalsForTicketIds | If not blank, a comma-separated list of ticket IDs (on the receiver, not the sender) which should not be managed by the trade copier. Allows some but not all trades to be controlled manually. |
Slippage management | |
TradeAllOrdersAtMarket | If turned on, the receiver always buys/sells at its current market price, regardless of any difference between that and the sender's price. If this setting is turned on, the following three settings become redundant and are ignored. |
AllowSlippagePips | Determines how close the receiver's price needs to be to the sender's entry price for a signal to be allowed. For example, if the sender buys GBPUSD at 1.34235, and AllowSlippagePips is set to 2.0, then the receiver will trade the signal provided that its current ask price is not above 1.34255. (This setting is ignored if TradeAllOrdersAtMarket is turned on.) |
PlaceLimitOrderIfSlipped | If the receiver's price is beyond the AllowSlippagePips threshold, then this parameter specifies whether the receiver should try to place a limit order - i.e. wait for the price to return to the sender's entry level. (This setting is ignored if TradeAllOrdersAtMarket is turned on.) |
LimitOrderExpirationMinutes | Only used if PlaceLimitOrderIfSlipped is turned on. Determines how long the limit order is valid for - i.e. how quickly the price needs to return to the sender's entry level before discarding the signal. Please note that some brokers have minimum expiry periods (e.g. either no expiry, or not less than 15 minutes away). Orders will fail if this setting is too low. |
ImmediateCloseOnSlippagePips | Closes a new trade immediately if the actual filled price differs from the expected quote price by the specified number of pips. A value of zero disables this check. |
MarketOrderSlippageParameter | Only applicable to brokers using instant execution rather than market execution. Specifies the maximum deviation from the current price which the EA is prepared to accept, broadly equivalent to the "max deviation" setting when placing a manual order. Please note that brokers do not necessarily honour this parameter exactly. The default value of 9999 in effect instructs instant-execution brokers to behave like market-execution brokers. |
Order management | |
RequireSignalWithinSeconds | |
OrderRetries | If placing a market order, the number of times the order is retried if the broker declines it. |
RequireSenderFillWithinMinutes | If a pending order is filled on the receiver, but remains unfilled on the sender, then the receiver closes it in this number of minutes if it remains unfilled on the sender. This parameter is ignored if less than or equal to zero. |
MagicNumber | A magic number to be used by the sender to keep track of its trades. If this is left at zero, the EA automatically picks a unique magic number based on the channel name. Each receiver EA running in a copy of MT4/5 must use a different magic number. |
InvertTrades | If turned on, the direction of the broadcaster's trade is inverted, with a buy becoming a sell etc |
UseOriginalOrderComments | Tells the receiver to use the original order comment from the sender, instead of its usual behaviour where it tracks the sender ticket number in the order comment. Please note that this setting has disaster-recovery implications. |
UseCustomOrderComment | Tells the receiver to use this fixed comment for all orders. This setting overrides any comment on the original order, and also overrides the UseOriginalOrderComments parameter. Please note that this setting has disaster-recovery implications. |
PreventPartialExits | Prevents the receiver from doing partial closes; a position is always closed in its entirety if the sender closes any of its position. |
IgnorePartialExits | Tells the receiver to ignore partial closes, keeping the original trading volume open without modification. The position is only closed on the receiver when the final tranche is closed on the sender. PreventPartialExits takes precedence; IgnorePartialExits is ignored if PreventPartialExits is turned on. |
EntryOffsetPips | If non-zero creates a limit or stop order above/below the sender's entry price, instead of a buy/sell order. A positive value places a stop; a negative value places a limit. For example, a value of -10 means that, when the sender opens a sell position, the receiver will place a sell-limit 10 pips beyond the sender's price |
The following settings are used in order. For example, EquityPerLot will only be used if UseFixedLotSize, UseRiskFactor and UseLotSizeMultiplier are turned off by setting them to zero | |
UseFixedLotSize | If not zero, the receiver uses this fixed lot size instead of the value specified by the sender. Overrides UseRiskFactor and UseLotSizeMultiplier. |
UseRiskFactor | If not zero, tells the receiver to trade a multiple of the sender's lot size based on the receiver's equity versus the sender's equity. For example, if the sender's equity is $1000 and the receiver's equity is $2000, and UseRiskFactor is set to 1, then the receiver will trade double the lot size of the sender. Overrides UseLotSizeMultiplier. |
UseLotSizeMultiplier | If not zero, modifies the lot size received from the sender so that the receiver uses this multiple of the broadcast size, e.g. 0.1 to trade one-tenth of the original lot size. |
EquityPerLot | If not zero, calculates the lot size based on the receiver's equity, ignoring the sender's lot size. For example, if the receiver's account equity is $4,800, and EquityPerLot is $10,000, then the receiver will trade 0.48 lots. |
BalancePerLot | If not zero, calculates the lot size based on the receiver's balance, ignoring the sender's lot size. For example, if the receiver's account balance is $3,200, and BalancePerLot is $10,000, then the receiver will trade 0.32 lots. |
CashRiskFixed | If not zero, a maximum cash amount (such as $100) to risk per trade. Requires that sender trades have a stop-loss, or for the FixedSLPips parameter to be set. |
CashRiskEquityPercentage | If not zero, a maximum percentage of your equity to risk per trade. Requires that sender trades have a stop-loss, or for the the FixedSLPips parameter to be set. |
CashRiskBalancePercentage | If not zero, a maximum percentage of your balance equity to risk per trade. Requires that sender trades have a stop-loss, or for the FixedSLPips parameter to be set. |
NotionalDepositVolume | If not zero, instructs the Receiver to trade a fixed amount of the deposit currency. For example: |
CalculateRiskFactorFromBalance | If turned on, risk-based lot sizing (UseRiskFactor) will be based on account balance, not account equity |
Lot sizing limits | |
MaxLots | Ignored if UseFixedLotSize is turned on (i.e. non-zero). Caps a variable lot size calculation (e.g. from UseRiskFactor) so that it does not lead to a dangerously large value. If you want to prevent an order being traded, rather than capping its lot size, use IgnoreOrdersLargerThanLots. |
MinLots | Ignored if UseFixedLotSize is turned on (i.e. non-zero). Collars a variable lot size calculation (e.g. from UseRiskFactor) so that it does not lead to a value which is too small. If you want to prevent an order being traded, rather than capping its lot size, use IgnoreOrdersSmallerThanLots. |
CentAccount | Turn on for accounts where all values are in cents rather than dollars. Equivalent to setting parameters such as UseRiskFactor and LotSizeMultiplier to 0.01 instead of 100. |
RoundUpToBrokerMinimum | Ignored if UseFixedLotSize is turned on (i.e. non-zero). Otherwise, determines what to do if the lot size falls below the minimum from the receiver's broker - for example, the broker has a minimum of 0.1 lots; the sender specifies 0.1 lots; and the receiver has UseLotSizeMultiplier set to 0.5; leading to a size of 0.05 lots. If RoundUpToBrokerMinimum is turned on then the receiver will take the trade and use the broker's minimum lot size. If this setting is turned off, then the receiver will ignore the trade. |
LotSizingAlwaysRoundDown | If conversion of the sender's lot size leads to a value such as 0.0256, tells the EA always to round down (to 0.02) rather than rounding to the nearest permitted size (0.03). |
Please see the notes about when the receiver s/l and t/p are used.
S/L and T/P | |
FixedSLPips | If non-zero, a fixed number of pips to use for the stop-loss on all trades. If this is turned on, then any stop-loss used by the sender will be ignored. You must turn on FixedSLPips in order to use any of the cash-risk lot-sizing modes such as FixedCashRisk. |
FixedTPPips | If non-zero, a fixed number of pips to use for the take-profit on all trades. If this is turned on, then any take-profit used by the sender will be ignored. |
MirrorSLandTPChanges | If turned on, the receiver copies the s/l and t/p on each order - but only if FixedSLPips and FixedTPPips are not used. Also controls whether changes to the entry price on pending orders are copied. |
MinSLPips | Ignored if FixedSLPips is used. Otherwise, if non-zero, signals are amended so that the stop-loss on trades is never smaller than this number of pips. |
MaxSLPips | Ignored if FixedSLPips is used. Otherwise, if non-zero, signals are amended so that the stop-loss on trades is never larger than this number of pips. If the sender does not specify a stop-loss then this number of pips will be used. |
MaxCashRiskPerTrade | If non-zero, trades from the sender are ignored if the potential loss is larger than this amount (in the receiver's deposit currency), based on the lot size and stop-loss. Trades will be ignored if the sender does not specify a stop-loss and the receiver does not have MaxSLPips turned on (because loss is potentially unlimited). Please note that this risk is calculated using the tick-value at the time of trade placement, and this can then vary while the trade is active. The risk calculation also does not include any slippage compared to the sender's entry price. |
MaxTPPips | If non-zero, signals are amended so that the take-profit on trades is never larger than this number of pips. If the sender does not specify a take-profit then this number of pips will be used. |
TrailingStopPips | If non-zero, applies a trailing stop to all orders, overriding and ignoring any s/l specified by the sender. The copier uses a "classic" trailing stop which comes into effect immediately, unlike MT4/5's own trailing stops which only apply once an order is in profit. |
Account management | |
StopTradingBelowEquity | If turned on (greater than zero), the EA stops taking new signals and attempts to close all its existing orders if the account's equity falls below this cash value. The EA does not close any orders which it is not responsible for - i.e. from other EAs or from manual trading. |
StopTradingAtDrawdownPercent | If turned on (less than zero), the EA stops taking new signals and attempts to close all its existing orders if floating P/L falls below the specified percentage of balance. The percentage must be entered as a negative number. For example, if the value were set to -40, then the EA would terminate if e.g. account profit fell below $-800 on a $2000 balance. The EA does not close any orders which it is not responsible for - i.e. from other EAs or from manual trading. |
MaxOpenOrders_Total | If non-zero, stops the EA taking new signals if the number of open/pending orders would exceed this value. For example, setting this parameter to 1 will stop the EA trading if there is already any open or pending order. The count includes all orders on the account, from any source, not just those created by the copier. |
MaxOpenOrders_FromCopier | As above, but the count only includes orders placed by the receiver EA. There can be any number of orders from other EAs or from manual trading. |
MaxTradesPerDay_Total | If non-zero, stops the EA taking new signals if the total activity on the account has already reached this number of orders for the day. Includes all orders from all EAs and from manual trading, and includes open pending orders as well as open and closed trades (but not cancelled pending orders). |
CalculateProfitFromOwnOrdersOnly | By default, StopTradingAtDrawdownPercent is calculated using all the open trades on the account. Turning on CalculateProfitFromOwnOrdersOnly changes the calculation so that the Receiver only looks at the drawdown relating to its own trades, ignoring any other activity on the account. |
BalanceDateForDrawdown | If specified, the balance calculation for StopTradingAtDrawdownPercent includes all trades, ignoring CalculateProfitFromOwnOrdersOnly, up to but not including the specified date. The calculation of closed and open trades is then from the specified date onwards, only looking at the Copier's own orders if CalculateProfitFromOwnOrdersOnly is turned on. If not specified (the default date of 1/1/1970), then StopTradingAtDrawdownPercent uses the current balance. |
MaxTradesPerDay_FromCopier | As above, but the count only includes orders placed by the receiver EA. There can be any number of orders from other EAs or from manual trading. |
MaxLosingTradesPerDay_Total | If non-zero, stops the EA taking new signals if the number of losing trades closed (not opened) today has reached the specified threshold. Includes all orders from all EAs and from manual trading. The count only applies to closed trades, not open positions. A limit of 1 does not prevent the Copier from opening 5 concurrent trades which all turn out to be losers. |
MaxLosingTradesPerDay_FromCopier | As above, but the count only includes orders placed by the receiver EA. There can be any number of orders from other EAs or from manual trading. |
Alerts and notifications | |
UserDescription | Controls the description which is displayed in the top-right of the chart, making it easier to distinguish between multiple copies of the EA with different settings. (This setting has no effect on trading behaviour.) |
BackgroundColour | Chart background colour which the EA uses. This can be altered to make it easier to distinguish between multiple copies of the EA with different settings. |
LabelColour | Colour of the EA's text labels (may need to be changed if you alter the background colour) |
NewOrders_AlertOnScreen | If turned on, the EA displays an alert on screen about each new trade which it opens |
NewOrders_AlertByEmail | If turned on, the EA sends an email about each new trade which it opens (using the MT4/5 settings in Tools/Options/Email) |
ClosedOrders_AlertOnScreen | If turned on, the EA displays an alert on screen about each trade which it closes |
ClosedOrders_AlertByEmail | If turned on, the EA sends an email about each trade which it closes (using the MT4/5 settings in Tools/Options/Email) |
RejectedOrders_AlertOnScreen | If turned on, the EA displays a message on screen about each order which it chooses not to trade (e.g. because the lot size is too large/small). |
RejectedOrders_AlertOnScreen | If turned on, the EA displays a message on screen about each order which is rejected by the broker. |
RejectedOrders_AlertByEmail | If turned on, the EA sends an email about each trade which is rejected by the broker (using the MT4/5 settings in Tools/Options/Email) |
Problems_AlertByEmail | Any problems requiring user attention are always displayed on screen. This setting determines whether the messages are also sent by email (using the MT4/5 settings in Tools/Options/Email) |
AlertIfHeartbeatMissingSeconds | If non-zero, generates an alert if the EA has not received a heartbeat from the sender for this number of seconds |
Alert text (see below for variables) | |
OrderOpen_ScreenAlertText | Text to display in relation to NewOrders_AlertOnScreen |
OrderOpen_EmailSubjectLine | Subject line for emails sent by NewOrders_AlertByEmail |
OrderOpen_EmailBody | Body text for emails sent by NewOrders_AlertByEmail |
OrderClose_ScreenAlertText | Text to display in relation to ClosedOrders_AlertOnScreen |
OrderClose_EmailSubjectLine | Subject line for emails sent by ClosedOrders_AlertByEmail |
OrderClose_EmailBody | Body text for emails sent by ClosedOrders_AlertByEmail |
You can control the text which is displayed by the receiver on screen or sent by email. The following variables can be used in the alert text parameters such as OrderOpen_ScreenAlertText:
Variable | Description |
{CHANNEL} | The name of the channel which the EA is receiving messages on |
{ACC} | MT4/5 broker account number |
{TICKET} | Broker ticket number of the receiver's order |
{SYMBOL} | Symbol of the receiver's order |
{LOTS} | Lot size of the receiver's order |
{OPENTIME} | Open time of the receiver's order (broker time, not local or UTC) |
{OPENPRICE} | Open price of the receiver's order |
{CLOSETIME} | Close time of the receiver's order (broker time, not local or UTC) |
{CLOSEPRICE} | Close price of the receiver's order (zero on open orders) |
{BUYSELL} | "Buy" or "Sell" depending on the direction of the receiver's order |
{CLOSEORDELETE} | If an order is being cancelled, "closed" or "deleted" depending on whether the trade copier is closing an open order or deleting a pending order |
{PNL} | Cash profit/loss on the receiver's order (excluding swap and commission) |
{PNLPIPS} | Profit/loss on the receiver's order in pips. |
{SWAP} | Swap value on the receiver's order |
{COMM} | Commission on the receiver's order (a negative number for commission charged) |
{TOTALPNL} | Total profit/loss on the receiver's order: {PNL} plus {SWAP} plus {COMM} |
{COMMENT} | The comment text assigned to the receiver's order |
{POSITIONID} | The sender's ID for the signal |
{MAGIC} | The magic number assigned to the receiver's order - the MagicNumber parameter for the EA |
{SL} | The stop-loss price on the receiver's order (zero if none) |
{TP} | The take-profit price on the receiver's order (zero if none) |
{LOCALTIME} | The receiver's local time, according to the computer's clock |
{BROKERTIME} | The broker's latest reported time |
{CURR} | The receiver's deposit currency symbol |
{BALANCE} | The receiver's account balance |
{EQUITY} | The receiver's account equity |
{FREEMARGIN} | The receiver's free margin |
{MARGININUSE} | The receiver's margin usage |
{COMPANY} | The broker's company name |
{TERMINALPATH} | The location of the MT4/5 installation - e.g. C:\Program Files\MyBroker |
{CRLF} | Inserts a new line, for use in emails |
The IncludeTradingTimes parameter in the receiver EA lets you control the times of each day when the receiver is allowed to place trades. There are also separate parameters for each day of the week, such as Tuesday_TradingTimes. Any incoming order messages outside these times will be ignored. All times are interpreted as broker time, not local time.
The format of the trading-times parameter is a comma-separated list of permitted times, each of which can be either a single hour (or minute), or a range. Examples are as follows:
2:45 Only allow trading at 2.45am (i.e. between 02:45:00 and 02:45:59)
14 Only allow trading between 2pm and 2.59pm
16-17:30 Only allow trading between 4pm and 5.30pm
7:15-11 Only allow trading between 7.15am and 11.59am (note: 11:59, not 10:59 or 11:00)
19:20-19:25 Only allow trading between 7.20pm and 7.25pm
Any number of these settings can then be combined as a comma-separated list (in any order). Therefore, the above examples could be combined to create a complex trading window as follows:
2:45,14,16-17:30,7:15-11,19:20-19:25
You should contact your sender of signals for support. FX Blue can only provide support to signal senders, not to their subscribers. Senders are responsible for providing support to their subscribers.
The sender and receiver EAs create comprehensive records of their activity in MT4/5's Experts log.
The MT4/5 Experts log is different to, and separate from, the MT4/5 Journal.
You can view the copier's records in the Experts tab of the Terminal pane of the MT4/5 software, and you can open the daily log files by right-clicking over the Experts log and choosing "Open" from MT4/5's pop-up menu.
The Receiver EA should start receiving heartbeat messages from the sender shortly after starting up, and display the last-heartbeat time on its chart. If no heartbeats are being received then please check the following:
A communication error is shown in the Receiver EA's status indicator on its chart
There is a record in the MT4/5 Experts log that the Receiver EA has been forced to terminate for some reason.
You are not using the same message hub as the sender
The sender is not active; they are not issuing signals
If the Receiver is unable to communicate with the message hub, it will show one of the following errors in its status indicator on the chart:
Error # | Meaning |
1 | Microsoft WinHttp error. Either the Microsoft WinHttp library is missing or damaged, or the computer is critically low on resources such as free memory |
2 - 4 | Failed to connect to the FX Blue message hub - check your internet connection and proxy server settings |
5 - 11 | No response from the FX Blue message hub - check the reliability of your internet connection |
12 | You are already using the same receiver details in another copy of the receiver EA |
13 - 14 | Corrupt response from the FX Blue message hub - check the reliability of your internet connection |
1005 | Your FX Blue account is inactive, and is no longer allowed to receive messages through the Trade Mirror |
2000 | The copy of the sender/receiver EA is out of date - you need a new version of the software |
2002 | Your FX Blue account has not been set up as a subscriber for the specified sender (or has been removed from the subscriber list) |
2003 | Incorrect FX Blue password |
2004 | There are too many users already connected to the sender's trades |
Your FX Blue account is already being used on another computer to receive trades from this sender | |
2006 | Your computer has been blacklisted because of abuse |
2007 | The sender's FX Blue account has been disabled from using the Trade Mirror |
2008 | You need to verify your email address with FX Blue before you can receive signals. Please go to http://www.fxblue.com/validate/email |
2009 | You need to verify your phone number with FX Blue before you can receive signals. Please go to http://www.fxblue.com/validate/phone |
The MT4/5 Experts log on the receiver will confirm why a trade has not been copied. If the receiver is successfully getting heartbeats from the sender, and updating its display of the last-heartbeat time, then there are only two reasons why a trade will not be copied:
The sender didn't issue a message to its subscribers for that trade. The sender logs will confirm whether a trade was sent to subscribers and, if not, why not.
The receiver EA or the receiver's broker rejected the sender's signal. The receiver logs will confirm receipt of the message from the sender, and show any rejection and the reason for that rejection.
Common reasons why trades cannot be copied are as follows. All of these will be listed and described in the logs.
The software cannot translate between the symbol names used on the sender account and the symbol names on the receiver account. You may need to adjust the receiver's ForexSymbolSuffix setting or, particularly for non-fx markets, you may need to add a CustomSymbolMapping.
The software's default lot sizing is not to trade exactly the same sizes on the receiver as on the sender. The default conversion may mean that orders are too small to trade on the receiver account. You either need to turn on the RoundUpToBrokerMinimum parameter in the receiver EA, or you need to choose a different lot-sizing mode. Please note that both of these options will mean that the receiver is taking more risk per order than the sender account.
The main "AutoTrading" button in MT4/5 is turned off, or the "Allow live trading" setting is not turned on for the receiver EA. Please note that the option in MT4/5's Tools / Options / Expert Advisors does not affect any EAs which are currently running; the setting in Tools / Options is the default for when you next add an EA to a chart. ("Allow live trading" in MT4/5 means "allow trading by automated systems", not "allow trading on a live account as opposed to a demo account".)
If the price difference between sender and receiver is larger than AllowSlippagePips, the copier's default behaviour is to open a pending order at the sender's original entry price. But your broker may have a minimum distance between pending orders and the current market price. It is possible for the difference to be larger than AllowSlippagePips but smaller than the broker's minimum distance, making it impossible to open a trade or pending order unless you increase AllowSlippagePips.
The copier will log any rejections by the broker's MT4/5 server. All common errors will be accompanied by a description (such as "requote" for error #138 in MT4).
For more information on error codes from MT4/5, please see the MT4/5 documentation:
MT4: https://docs.mql4.com/constants/errorswarnings/enum_trade_return_codes
MT5: https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes
A few extra notes on error messages which are famously obscure in the MT4/5 documentation:
Automated trading disabled (MT4 error #4112, MT5 error #10026): usually means that your account has multiple versions of each symbol, such as EURUSD and EURUSD+, and you are trying to trade the wrong one. Automated trading is not usually disabled; more commonly means that the symbol version you are trying to trade is disabled by the broker and only included in the account for internal purposes. You typically need to use the ForexSymbolSuffix setting or a CustomSymbolMapping to tell the copier to trade a different version of the symbol.
MT4 error #130: this can have two separate causes. Either a stop-loss or take-profit is closer to an order's entry price than the broker allows, or the entry price on a pending order is closer to the current market price than the broker allows.
MT4 error #136: typically indicates an unexpected problem on the broker's server. For example, the broker has lost its connection to external liquidity or an external price feed, and is rejecting client trades because it cannot currently process them.
If the same trade is copied more than once on the receiver account then there are two possible explanations: you are running more than one instance of the receiver copy of MT4/5; or the connection with the broker is timing out and the broker is placing trades despite returning an error message.
Please use the Windows Task Manager to check that you only have the expected number of running copies of MT4/5 (terminal.exe / terminal64.exe), making sure to use the "Show processes from all users" option.
On a VPS in particular, it is quite easy to open multiple remote-desktop sessions by accident, and have the same copy of MT4/5 running in more than one session at once.
If the broker's server returns a timeout error, then the receiver will retry the order (unless OrderRetries is set to zero). Despite returning an error, the broker may in fact have accepted the order, and the retry may then create a duplicate.
If you receive timeout errors from the broker server, you should contact your broker. It indicates either a problem with your broker's server, or a problem with your internet connection to the broker.
The main reason why trades are instantly closed on the receiver is that there is more than one EA sending messages on the specified "Channel".
Please check the following:
Check the MT4/5 Experts log. The reason for all actions by the copier will be confirmed in these logs.
Check that you are only running one copy of the sender EA or, if there are multiple sender EAs, check that each one is using a different channel parameter.
Use the Windows Task Manager to check that you only have the expected number of running copies of MT4/5 (terminal.exe / terminal64.exe), making sure to use the "Show processes from all users" option.
The Copier will reject trading signals if the time difference between the sender and receiver is larger than the RequireSignalWithinSeconds setting.
There are two possible causes of warnings about time differences:
There really has been a delay in receiving and processing an instruction to open a new order, for example because the copier needs to open multiple orders at once.
Your computer clock, or time zone, is wrong.
If the reported difference between the sender's time and your time is a large number - for example, one or more hours - then the problem is almost certainly that the Windows clock on your computer is incorrect (or that the sender's clock is wrong, though this is less common). Please check that the clock is showing the correct time, and also that the time zone is correct - so that the computer is calculating GMT correctly.
Error #2005 means that your user details appear to be in use from another computer. There are two possible causes:
There is indeed another copy of the Receiver on another computer logged in using your details (or, on VPS, another session in which MT4/5 is running)
Your IP address has recently changed, e.g. because your internet connection is unreliable, had dropped, and has been restored with a new IP address.
Please check that there are no other running copies of MT4/5 using the same user details.
If it is definitely the case that no other copies of MT4/5 are running, and the cause is a change of IP address, then you will be able to start using the Receiver on your new IP address within a maximum of 15 minutes.
This section only applies to MT5, not MT4, and it only applies to netting accounts in MT5 (where there is a single position per symbol, rather than hedging accounts which have separate tickets for each buy and sell).
The copier can be used on MT5 netting accounts, but there are additional considerations which you need to bear in mind. To use the copier on a netting account, you need to turn on the AllowMT5NettingAccount setting in the Advanced section of the EA's options, to indicate that you have read this part of the user guide.
On an MT5 netting account, the Receiver will maintain a list of "virtual" positions. For example:
Sender is a hedging account, and opens separate tickets for a buy and then a sell in EUR/USD. Sender has no net position in EUR/USD, but has two open tickets because it is a hedging account.
The MT5 netting Receiver will open a EUR/USD position (corresponding to the sender's buy) and then close it (corresponding to the sender's sell)
But the MT5 netting Receiver is still tracking the "virtual" buy and sell positions on the sender
If the sender closes its sell ticket, the netting Receiver will re-open its buy position in EUR/USD - matching the net position (the buy ticket) which the sender now has
There are three special things you need to bear in mind about using the Receiver on an MT5 netting account:
If you want to close the Receiver's positions, you must do so using the list which it displays in the top-right of its chart, and the Close button next to each virtual ticket. You cannot close a virtual position in the Receiver just by closing the actual position on your account. The Receiver cannot know that a trading action by you - or another EA etc - is meant to be a close of the Receiver's position rather than an independent trading action.
For example: Sender opens a buy ticket. Receiver opens a corresponding buy position. You manually close the buy position on your account without using the Close button on the Receiver's chart. The Receiver still regards its virtual position as open. Sender closes its buy ticket. Receiver will place a new sell order, opening a new short position, matching the activity on the sender.
The Receiver will not copy any s/l or t/p from the sender (which are anyway only a safeguard). The sender may have multiple tickets with a different stop-loss and take-profit whereas the netting account can only have a single s/l and t/p. Trades will still be closed when they are closed on the sender (or disappear from the sender's heartbeat).
The Receiver has to track its virtual tickets using a file on disk (in MQL5\Files). If you move the Receiver to another computer, you need to transfer this file, or else the Receiver will lose its memory of the virtual tickets which it has open.
You can make your own modifications to the copier using MQL code libraries in MT4/5.
Before describing the libraries, there are two important notes about re-installing the copier if you use these external filters:
If you re-run the copier's installer program, this will overwrite any changes which you have made to the custom code libraries described below. If you make changes, you should keep copies of your modified files, and re-install them into MT4/5 after you re-run the copier's setup program.
In future versions of the copier, there may be additions to the functions/hooks in the external filter libraries. When a new version of the copier is released, you may need to update your modified code with new functions which the copier expects to find in the external MQL library.
The copier has an MQL code library called CopierReceiverFilter. This is used by the copier if you turn on the UseExternalFilters setting in the Advanced section of the receiver options. You can modify and recompile this library to create your own rules for the following:
Prevent the receiver copying specific signals from the sender
Change how the receiver copies a trade from the sender - override the lot-sizing, swap the trade direction, change the s/l or t/p, or even change one symbol to another
Prevent trade closes in the receiver
For information on how the filters work, simply open the .mq4/.mq5 file in MT4/5's MQL\Libraries directory. You can add your own rules to this file, recompile the .ex4/.ex5 library, turn on UseExternalFilters, and then reload the copier. Please remember to take a backup of your modified files - as described above.
This section is only applicable to MT4, not to MT5. Trade placement in MT5 is asynchronous. The MT5 copier does not need (and does not have) the optional worker EA described here.
An EA in MT4 cannot do anything else while it is waiting for the broker to accept/reject a trading instruction. Therefore, if two (or more) signals arrive from the sender simultaneously, the MT4 receiver cannot start working on the second one until the broker has accepted/rejected the first one. If trade placement by the broker is slow (including a slow internet connection to the broker), then this can lead to quite large delays in trade copying.
You can improve the speed of copying in MT4 using the optional Receiver-Worker EA. You use this as follows:
Run the Receiver EA on one chart
Open at least two further charts, and run the Receiver-Worker EA on each of them
The main Receiver EA will automatically detect the workers, and use the workers to place trades for it
This allows the Receiver to handle more than one trading instruction at once
There is no point using the Receiver-Worker unless you run at least two copies of it. A single copy will still only allow a single trading action by MT4 at once, and will be fractionally slower than not using a worker at all because of the time taken for the Receiver to communicate with the worker rather than the Receiver EA just placing the trade itself.
However, there is also no point running more than 8 copies of the Receiver-Worker. MT4 has a limit that only 8 EAs can trade simultaneously.
The following screenshot shows an example of the Receiver EA running alongside three workers: