CopierMT4
- Utilitys
- Dmitry Fedoseev
- Version: 1.1
- Aktualisiert: 20 August 2024
- Aktivierungen: 5
Copier for the MetaTrader4 terminal. Designed to copy trade from one terminal to another. Compatible with the version for the MetaTrader5 terminal; if available, copying can be performed between different terminals (regardless of the type of accounts: hedging or netting). The number of accounts to which copying is possible is not limited (depends only on the computing power of your computer).
Directions for copying the version for MetaTrader 4 together with the version for MetaTrader 5:
- MT5 Netting -> MT5 Netting, MT5 Hedging, MT4;
- MT5 Hedging -> MT5 Netting, MT5 Hedging, MT4;
- MT4 -> MT4, MT5 Netting, MT5 Hedging.
Fast start. To start copying, it is enough to launch an instance of the copier with default settings on the master terminal (from which you want to copy). And in the slave terminals (to which you need to copy), launch one version of the copier, setting the Mode parameter to slave, and the Slave_K parameter to the volume (lot) conversion factor.
Replacing symbol names. If the symbols on the master and slave accounts have different names (they have prefixes or postfixes, for example, on the master account the symbol is named EURUSD, and on the slave account EURUSDm), you need to create a replacement list. The file with the replacement list must be located in the Common Data Folder. To find the Common Data Folder, open MetaEditor and execute the command Main menu – File – Open Common Data Folder. One line of the file includes two fields separated by a semicolon. The first field is the name of the symbol on the leading account, the second field is the name of the symbol on the slave account. An entry must be made for each character.
Example file contents:
USDHPY;USDJPYm
The file name with symbols replacement must be specified in the Slave_Replace variable for instances on slave accounts.
Selective copying. Selective data transfer is possible from the leading account: only certain symbols, magics or symbol-magic pairs. To do this, you need to create a list of symbol-magic pairs. The file must be located in the Common Data Folder. One line of the file includes two fields separated by a semicolon. The first field is a symbol, the second field is magic.
Example file contents:
GBPUSD;343
An empty value in the field for a symbol or the entry "all" will mean all symbols, and a magic of -1 will mean all magics.
The name of the file with the list of magic-symbols must be specified in the Master_List variable on the master account.
Copying from multiple accounts. To perform copying from several accounts, on each leading account you need to launch an instance of the copier in master mode and specify different values for the ChannelName variable. On the slave account, it is necessary to run the appropriate number of copiers in slave mode, in the ChannelName variables, specify similar values (as on the master accounts), and in the Slave_Magic variables, you must specify different values.
Attention! On netting accounts (when working together with the version for MetaTrader5), the magic does not work. That is, it is impossible to copy from several leading accounts to a netting account (and parallel work by other experts or manually is also impossible). Also, from netting accounts, selective copying is possible only by symbol (without checking the magic).
All parameters:
ChannelName - name of the channel for data exchange. The ability to change the channel name allows you to copy from multiple master accounts to one slave account (or multiple slave accounts).
Mode - copier operating mode: master - leader account, slave - slave account.
Master_List - is the name of a file with a list of symbol-magic pairs. If you do not enter anything into this variable, the list is not used and all master account positions are copied.
Slave_K - volume (lots) conversion factor.
Slave_MinVol - if the recalculated volume is less than the minimum volume, then the value is increased to the minimum volume. If false, if the master account has a small position, the slave account may not have it. If true - if there is a position on the master account, then there will definitely be a position on the slave account.
Slave_Magic - magic of transactions on the slave account. Valid only on a hedge account. Using magic on a hedge account will allow you to copy to one account from several leading accounts, as well as, in parallel with copying trade, to trade manually or with other experts.
Slave_Replace - is the name of the file with the list of symbol replacements. If the symbol names on the master account and the slave account are different, for example, they have the prefix: EURUSDm, then a replacement list must be created for the slave account.