Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
Hello coder,
I have a trade copier and need modification in it. I have attached trade copier and the way in which i need modification is discussed below.
This EA has two components.
1. Sender EA
2. Receiver EA
Way in which these EAs will work is mentioned below.
(1) SENDER EA
There should be option to specify which trades will be send to the receiver EA based on lot size. I will specify the lot size and trades opened with these
lot size should get send to receiver EA and all other trades should be neglected. For example, i specify in sender EA option, as 0.1,0.6,1,4
Now, any trades opened with these lot sizes should get send by sender EA to receiver EA and all other trades opened with lot size other than these should not
get send by sender EA. Suppose, some trades opened on sender EA a/c in a manner:-
1st trade with 7 lots
2nd trade with 4 lots
3rd trade with 0.6 lots
4th trade with 0.1 lot
5th trade with 8 lots
6th trade with 0.9 lots
7th trade with 1 lot
8th trade with 0.1 lot
Now, sender EA should send 2nd, 3rd, 4th, 7th and 8th trades (because these are opened with lot sizes specified in sender EA) and 1st, 5th and 6th trades
should not be send by sender EA to receiver EA.
Sender EA only send signal to open trades, not to close. Closure of trades will be handled by receiver EA.
Sender EA Receiver EA
1st trade opened with 7 lots----------------------No-------------------------------------------NO-----------------
2nd trade opened with 4 lots----------------------Yes------------------------------------------Trade executed-----
3rd trade opened with 0.6 lots--------------------Yes------------------------------------------Trade executed-----
4th trade opened with 0.1 lot---------------------Yes------------------------------------------Trade executed-----
5th trade opened with 8 lots----------------------No-------------------------------------------No-----------------
6th trade opened with 0.9 lots--------------------No-------------------------------------------No-----------------
7th trade opened with 1 lot-----------------------Yes------------------------------------------Trade executed-----
8th trade opened with 0.1 lot---------------------Yes------------------------------------------Trade executed-----
(2) RECEIVER EA
Receiver EA should have four options in addition to present options:-
1. Lot size
2. TP
3. SL
4. Invert trades
When receiver EA receive a trade from sender EA then it should open that trade with pre-defined lot size, tp and sl. If a trade hits sl then it should get closed
and in case sl fails then the trade should get closed immediately.
Receiver EA should open trade with pre-defined sl but tp should remian in hidden mode. When this trade reach tp then the trade should not get closed rather it will
continue and receiver EA should open another trade at this point in the same direction with pre-defined lot size, tp and sl as it was in 1st trade. If 2nd trade
touches tp then receiver EA should open 3rd trade in the same direction with pre-defined lot size, tp and sl. If 3rd trade hits sl then it should get closed
and along with it 1st and 2nd trades should also get closed.
Receiver EA (lot size-10, TP-100, SL-60)
To understand it simple:-
- Receiver EA receive signal to open a buy position and execute 1st trade.
Trade no. Action Lot size Open Price TP SL
1 Buy 10 1000 0000 (Hidden TP-1100) 940
- 1st trade reaches its tp i.e. 1100. At this point, receiver EA will open 2nd trade in the same direction with pre-defined lot size, tp and sl. Here, 1st trade
will not get closed but it will continue. Receiver EA will also make changes to 1st trade sl.
Trade no. Action Lot size Open Price TP SL
2 Buy 10 1100 0000 (Hidden TP-1200) 1040
1 (update) Buy 10 1000 0000 (Hidden TP-no use) 1040
- 2nd trade reaches its tp i.e. 1200. Again EA open 3rd trade and also continue 1st and 2nd trades making changes to their sl.
Trade no. Action Lot size Open price TP SL
3 Buy 10 1200 0000 (Hidden TP-1300) 1140
2 (update) Buy 10 1100 0000 (Hidden TP-no use) 1140
1 (update) Buy 10 1000 0000 (Hidden TP-no use) 1140
Suppose 3rd trades hit sl i.e. 1140 then at this point all three trades will close simulataneously.
* If receiver EA receive 2 or more trade at a time or receive 2nd trade from sender EA when there are already trades opened on receiver EA, in that case receiver EA
should open this trade also and manage this trade series independently i.e. all trades series should be managed independently.
** It should manage automatically for 4 and 5 digits quotes.