Работа завершена
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Техническое задание
A copytrading script/EA - It executes certain commands whenever there is a trading activities on the trading account i.e. new trade, on close, modification etc
1) It will have settings to copy all trades or only trades with its unique magic/comment
2) it fetches information from an external remote DB using this trading account number and broker name/ip -- It retrieves all the slave trading accounts from the external DB and their broker IP, risk settings to copytrading -- displays on the chart panel all the information i.e. slave account numbers, risk settings and whether copying all trades or magic trades
3) Whenever a trading activity is in place, it calls an external php/dot net MANAGER API (i will provide) to place trades using on multi brokers as per the below settings:
3.a) if it is a new order manually from the same terminal as per the risk settings fetched from DB
3.b) if the order is placed by another terminal using the same account or another chart using another EA:
3.b.1) it will check if COPY ALL is selected, then copy it as per the risk settings
3.b.2) if copy all not selected, then it ignores it and doesn't execute it
3.c) if it is a closing order, it will check magic/comment and close it on all the slave accounts and save it in the external database
3.d) if it is a modification, it will check magic/comment and modify it on all the slave accounts and save it in the external database
--- if copy all settings then it will copy these trades to all slave accounts
---- if copy with magic/comment id: it will match it and if matched only then copy to all slave accounts
---- if manually placed from the same EA account, then copies to all slave accounts. It also saves these trade orders on an external remote DB
4) having close all buttons - and it will close all trades that match its unique magic/comment number