Page tree
Skip to end of metadata
Go to start of metadata

It can be a situation when you have two MT4 servers and you want to combine them together, to join up one server database into another. To transfer clients from one server into another very seamlessly.

This tool completely combines two MT4 server databases together, its users, orders databases with corresponding group and symbol settings. All you need is to pass two MT4 installation folder path as command line argument and program will prepare result server with ready to go settings. When you run result server you will notice all users and their orders in place. Also, it takes care about symbol settings which can be different. As a result, client will be able to connect to new server and continue trading like nothing happened. After this you will have free MT4 server installation for new achievements!


How To

All files can be downloaded from: http://nuget.cplugin.com/feeds/apps/CPlugin.Tools.JoinMT4Servers

Terms

A server, which must include another server data will have name *Master*.

Server which about to be joined will have name Source.

Program do not change either *Master* nor *Source* files. It merge into new folder named *Result*. All current files remain the same.

*Result* = *Master* + *Source*

MASTER = always remain static (lets call it as NEW MT4 server) === all existing data inside this file will not be changed (BUT will be appended with new data later on from SOURCE)

SOURCE = to be filtered, and filtered data will be APPEND in to orders.dat, users.dat as well as config folder (files which relevant)

RESULT = will be at here (MASTER + SOURCE (APPEND) , and /config folder should belongs to MASTER files (with append in of SOURCE)

Algorithm of what program does internally

You shall not follow steps below, it's just an explanation of what program will do for you. You only run program and it do everything in one step.

For normal work it needs these files from *master* and * source* server:
- users.dat
- orders.dat
- groups.ini
- managers.ini
- secgroups.ini
- securities.ini

Groups

1. Copy *Master*'s *groups.ini* to *Result*
2. Join *Source*'s *groups.ini* to *Result*

Program add suffix to *Source*'s group names.
If there are intersection between *Source* and *Master* group names, program will fail asking operator to specify another suffix. (`_new` will be used by default if not specified anything else)

At the same time, *Source* accounts will have new group name.

Users

1. Copy *Master*'s *users.dat* to *Result*
2. Remember last login to use on next step
3. Join *Source*'s *users.dat* to *Result* using algorithm below:
1. if master does not have source's login, account will be copied as is without any problems.
2. if master does have, program will pre-allocate next available login and copy there. So, intersections will be resolved. But clients should be notified that their login changed from 'A' to 'B'. Password remains the same.

Managers

1. Copy *Master*'s *managers.ini* to *Result*
2. Join *Source*'s *managers.ini* to *Result*

*Source* accounts will have new login number.

Symbols

1. Copy *Master*'s *securities.ini* to *Result*
2. Join *Source*'s *securities.ini* to *Result*. If *Master* already has symbol with name came from *Source* it will not be joined.

Orders

1. Copy *Master*'s *orders.dat* to *Result*
2. Remember last order number to use on next step
3. Join *Source*'s *orders.dat* to *Result* starting from ticket from previous step. To avoid intersections.

*Source* orders will have new ticket number.

Usage

It has internal help system which can be access by running with `--help` parameter. It will show all available parameters to be specified.

CPlugin.JoinMT4Servers.exe [OPTION...]
--help Print help
-m, --master arg Master MT4 path, the server to whom we will join 'source' server
-s, --source arg Source MT4 path, a server we are going to join to 'master'
-r, --result arg Result MT4 path, the server which will contain both servers. (result = master + source)
-g, --groupsuffix arg Suffix to be added to 'source' groups (default: _new)
-f, --groupsfilter arg MQs groups filter to specify, what groups should be copied from 'source' server (default: ,*,)
-c, --clear Clear 'result' directory from files

  • No labels