Cloud based trade copying

MQL5 Experts Scripts

Spécifications

Based on (https://www.fxblue.com/appstore/u4/internet-trade-mirror-sender/user-guide) 

It needs to send trades from a master to a server that sends the trades to slave(s)

I need to be able to link different masters to different slaves

If a slave losses/gains too much money either in a day or overall i want it to stop copying it's master (i will set these parameters)

I need it to send trade history to the server 



3.1Trade placement and closure

The Sender EA sends a message as soon as it detects that there is a new open order in its copy of MT4/5. Receiver EAs will then attempt to place the same trade.

The same applies to trade closure. As soon as it spots that a previously open order has been closed, the Sender EA tells the Receiver EAs to close their trades.

Messages are sent to the subscribers 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 subscribers can be caused both by the latency in receiving signals and also price differentials between different brokers. Subscribers may need to adjust their AllowSlippagePips parameter in order to trade successfully, or even to turn on TradeAllOrdersAtMarket.

3.1.1Speed of processing on the receiver

Once a receiver gets a signal from your sender, it should make a request to its own broker almost immediately. The speed of trade copying on the receiver 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 your 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 your subscribers 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.

3.1.2Stop-loss and take-profit on the receiver

The stop-loss and take-profit on a subscriber's trade are only a safeguard in case the connection with your Sender is lost. Under normal circumstances, the subscriber's trade will be closed as soon as your trade is closed. The Receiver EA'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 subscriber's s/l or t/p is hit before your s/l or t/p.

3.1.3Slippage tolerance on the receiver

By default, there is a limit on the price difference which the Receiver EA will accept between your sender's price versus the receiver's price - controlled by the AllowSlippagePips setting.

If the price difference between your sender and the receiver is larger than this, the receiver will try to get your 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 turn off the slippage check by turning on the setting BroadcastAllOrdersAtMarket. This tells receivers to copy your trades regardless of any price difference.

3.2Heartbeats

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 EA sends a periodic "heartbeat" message, every 30 seconds by default. This states which orders should still be open. If a Receiver misses a trade-closure instruction, e.g. because its 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 in your sender's copy of MT4/5 and the Receiver 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.

3.3Pending orders

By default the Sender EA does not send pending orders. It only sends a message to Receivers once a pending order is filled and turns into a buy or sell order.

Copying pending orders is potentially very dangerous. Let's say that you are trading the breakout of yesterday's range, and you have a buy-stop at yesterday's high. This could get triggered on a Receiver without being triggered on the sender, because of slight price differences between the two accounts. If the price then retraces, the sending copy of MT4 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, you can configure the Trade Mirror to send pending orders by turning on the optional IncludePendingOrders parameter. Subscribers can then use the RequireSenderFillWithinMinutes parameter to limit the risk at their end. If the subscriber's order is filled, but your sender's order remains pending, then the Receiver EA can be configured to close its order after this number of minutes (ignored if zero).

3.4Lot sizing and risk

Subscribers can use several different modes for determining what lot size to trade:

Risk-based: trade sizes are adjusted based on the subscriber's account equity compared to your equity

Multiple: a simple multiple of your trade size (regardless of different account equity, and therefore % of risk)

Fixed: a fixed lot size per trade

Cash-risk: a fixed cash risk per trade, or a % of account equity or balance

For more information about the options available to subscribers, please see the Receiver EA user guide.

However, in addition to the options which are available to each subscriber, you can also alter the lot size which is issued by the Sender. For example, you can configure the Sender EA's parameters to give subscribers a fixed lot size rather than the actual volume you are trading.

3.5Broker symbol names and suffixes

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 Receiver EA should almost always be able to handle fx pairs without manual overrides to its settings

The Receiver EA 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 to the Receiver EA settings

3.6Market execution

(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.)

3.7Hedging vs. non-hedging

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 your sender opens a buy ticket and then a sell ticket (or vice versa), the first trade will be successfully copied on a FIFO/non-hedging account but the hedged trade will fail.

3.8Magic numbers

The Receiver EA 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 also 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. Subscribers can choose their own magic number by setting the MagicNumber parameter in the Receiver EA to something other than zero.

3.9Partial closes

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).

3.10Inverting trade direction

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, a subscriber needs to turn on the Receiver EA's InvertTrades parameter, and will also need to do one of the following:

  • Turn on the TradeAllOrdersAtMarket parameter. This means that the Receiver EA ignores the sender's entry price (because e.g. the sender is buying at the ask price whereas the receiver will be selling at the bid price).
  • Increase the AllowSlippagePips parameter, to cater for the fact that the difference between the sender's entry price and the receiver's entry price will be at least the size of the spread.

3.11Order comments

By default, the Receiver EA uses the MT4/5 order comment to track the ticket numbers on the sender account. The subscriber can change this behaviour, and get the Receiver EA to use the original comments from the orders on the sender account, by turning on the UseOriginalOrderComments parameter in the receiver.

Alternatively, the subscriber 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 a subscriber turns 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 the subscriber is starting up MT4/5 on a new computer in an emergency - then the Receiver EA will close all its orders because it can no longer link them to the sender's heartbeat.

3.12Controlling the Sender using MT4/5 Global Variables

You can block the Sender 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 Sender 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 Sender 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 Sender EA will not issue a message to subscribers when a new trade is placed.


Répondu

1
Développeur 1
Évaluation
(46)
Projets
60
45%
Arbitrage
8
50% / 38%
En retard
7
12%
Gratuit
2
Développeur 2
Évaluation
(16)
Projets
35
23%
Arbitrage
4
0% / 50%
En retard
2
6%
Travail
3
Développeur 3
Évaluation
(144)
Projets
199
42%
Arbitrage
20
25% / 55%
En retard
10
5%
Gratuit
4
Développeur 4
Évaluation
(26)
Projets
34
29%
Arbitrage
0
En retard
1
3%
Gratuit
5
Développeur 5
Évaluation
(70)
Projets
91
25%
Arbitrage
26
19% / 54%
En retard
25
27%
Gratuit
6
Développeur 6
Évaluation
(5)
Projets
4
50%
Arbitrage
4
0% / 75%
En retard
0
Gratuit
Commandes similaires
I need a robot that will grow small accounts to bigger amounts, I will test it on demo first then if it does what i want, i will take it. Please it must be simply to use. It must set targets, for example, once it reaches $200 profit for the day, it must close
I need a robot that will grow small accounts to bigger amounts like this one in this link, https://youtu.be/d38pMbJihew?si=3NeIOVyrlwDr4X_o. Please click the link and watch how this EA grow small accounts. Then create a robot like that. I will test it on demo first then if it does what i want, i will take it. Please it must be simply to use. It must set targets, for example, once it reaches $500 profit, it must
Your XAUUSD Buy Stop / Sell Stop Grid EA Strategy 1. Initial order placement Buy Stop orders — 5 orders Place 5 Buy Stop pending orders above the current market price. Each order is spaced 1.00 XAUUSD price unit apart. Initial lot sizes range from 0.01 to 0.05 lots . Sell Stop orders — 5 orders Place 5 Sell Stop pending orders below the current market price. Each order is spaced 1.00 XAUUSD price unit apart. Initial
I am looking for an experienced and highly competent MQL5 developer to create a bespoke, fully automated Forex Expert Advisor for Meta Trader 5 for my Apple iMac. The EA will incorporate a proprietary trading strategy involving multiple position management, dynamic trade execution, advanced profit management and sophisticated risk controls. Key technical requirements: Automated trade execution and management
Hello developers and quantitative traders, I am looking to purchase a license for an EXISTING, professionally developed MT5 quantitative portfolio Expert Advisor with a long-term, independently verifiable trading history. Purchase budget: $5,000–$15,000 USD Additional annual maintenance fee: $1,000 USD I am willing to establish a long-term commercial relationship with the developer. IMPORTANT: I am NOT looking for
SIERRA CHART 40+ USD
Hello. I have some custom chartbooks/studies that run on ACSIL C++ in Sierra Charts trading platform. I need them put into pinescript to be able to be used in trading view and look similar to the charts we are giving you. also need it to be able to work on ninja trader NinjaScript (C#)/java, and MQL4 and MQL5 for metatrader 4 and 5. You would have to assist with testing. Let me know if you can help with this task
Trading 35+ USD
Project: XAUUSD Gold Trading Robot for MetaTrader 5 I want to develop a fully automated Expert Advisor (EA) for MetaTrader 5, designed exclusively for Gold (XAUUSD) and compatible with the Exness broker. Trading Strategy: Liquidity + CHOCH + Retest Identify important buy-side and sell-side liquidity zones using previous highs and lows, equal highs/lows, and confirmed swing points. Wait for a clear liquidity sweep
I am looking to acquire an EXISTING and PROVEN MetaTrader 5 Expert Advisor. I am NOT looking for someone to develop a random new strategy from scratch. The objective is to find a robust EA with an existing track record, verify its performance and robustness, and purchase the MQL5 source code together with clearly defined commercial rights. MAIN REQUIREMENTS The EA should meet most or all of the following
Hello, I am a serious buyer interested in acquiring an existing, stable and profitable Expert Advisor (EA) specifically designed to: 👉 mainly (XAUUSD) or any other exchange rate This is a full purchase order. ⚠️ I'm not interested in creating a new EA from scratch. Only ready-to-use, proven systems with a real track record of performance. ✅ EA Requirements (Stringent) 📌 Symbol and Strategy ✔️ Trade Gold Only
Here is a professional, detailed requirements specification draft for your MQL5 freelance order based on your prompt: ​ Strategy Objective: Develop an automated Expert Advisor (EA) featuring a 1:3 Risk-to-Reward ratio optimized for a small starting budget. ​ Core Trading Logic: ​Execute automatic Buy and Sell trades using high-probability entry signals. ​Target a strict 90% theoretical win-rate structure through

Informations sur le projet

Budget
150+ USD