several terminals, one ea to charge

To add comments, please log in or register
Jhennifher
1161
Jhennifher  

i have 28 terminals mt4 on my pc; each time I have an update of EA, I must paste It on each one of 28 terminal folder at mql4;

is there anyway for paste it just one time at all mql4 folders? or any other way to make it more usefull?

tks

Marco vd Heijden
Moderator
12714
Marco vd Heijden  

Of course.

Anthony Garot
3272
Anthony Garot  
Jhennifher:

i have 28 terminals mt4 on my pc; each time I have an update of EA, I must paste It on each one of 28 terminal folder at mql4;

is there anyway for paste it just one time at all mql4 folders? or any other way to make it more usefull?

tks

A simple DOS batch script could automate the process.

Or if you are feeling adventurous, python is used pretty regularly for this sort of automation.

Icham Aidibe
11676
Icham Aidibe  
Jhennifher:

i have 28 terminals mt4 on my pc; each time I have an update of EA, I must paste It on each one of 28 terminal folder at mql4;

is there anyway for paste it just one time at all mql4 folders? or any other way to make it more usefull?

tks

28 terminals ! Wow. Did you heard about trade copy before ? You'll find plenty of solution to get the same result with one terminal, one ea & 28 accounts. 

Alain Verleyen
38685
Alain Verleyen  
Icham Aidibe:

28 terminals ! Wow. Did you heard about trade copy before ? You'll find plenty of solution to get the same result with one terminal, one ea & 28 accounts. 

Off-topic.

If you have 28 accounts, you need 28 terminals anyway.

Jhennifher
1161
Jhennifher  
Anthony Garot:

A simple DOS batch script could automate the process.

Or if you are feeling adventurous, python is used pretty regularly for this sort of automation.

do you know how do that?

Alain Verleyen
38685
Alain Verleyen  
Jhennifher:

i have 28 terminals mt4 on my pc; each time I have an update of EA, I must paste It on each one of 28 terminal folder at mql4;

is there anyway for paste it just one time at all mql4 folders? or any other way to make it more usefull?

tks

Easiest way is with junction or hard links.

Junction v1.07

Hard Links and Junctions (Windows)
  • msdn.microsoft.com
There are three types of file links supported in the NTFS file system: hard links, junctions, and symbolic links. This topic is an overview of hard links and junctions. For information about symbolic links, see Creating Symbolic Links. Hard Links A hard link is the file system representation of a file by which more than one path references a...
nicholi shen
2392
nicholi shen  
Jhennifher:

do you know how do that?

with python:

#! python 3
'''
1. Install dirsync with "pip install dirsync"
2. Save this script in the .../AppData/Roaming/MetaQuotes/Terminal folder. 
3. Run from commandline and specify the master terminal as an argument
    example:
    python meta_sync.py 23JKH5G4KJ2RH5HG2K3JH5G4
'''
import sys, os, re
from dirsync import sync

if __name__=='__main__':
    try: 
        master = sys.argv[1]
    except: 
        print('Please specify the master terminal!')
        exit()
    
    terminal_path = os.path.dirname(os.path.realpath(__file__)) 
    tfilter = re.compile(r'\w{20}')
    terminals = [t for t in os.listdir(terminal_path) if tfilter.search(t) is not None]
    if master not in terminals:
        print('Master not found in terminals.')
        exit()

    #get version
    def get_version(terminal):
        v = re.compile(r'MQL\d')
        for d in os.listdir(os.path.join(terminal_path, terminal)):
            if v.match(d):
                return d
        print("Error: couldn't determine version number")
        return ''
    
    terminals.remove(master)
    master_version = get_version(master)
    print('Sync in progress for {} terminals....'.format(master_version))

    terminals = [t for t in terminals if master_version == get_version(t)]
    
    print('*'*10,'RESULTS','*'*10)
    for t in terminals:
        print(sync(
            os.path.join(terminal_path,master), 
            os.path.join(terminal_path, t),
            'sync'
        ))
Jhennifher
1161
Jhennifher  
In my case, it is not for real account; it is for backtest; I test 28 pairs, each terminal I run one pair, cause it is not possible run more than one pairs at same time at mt4; when I update my EA, I must paste at each on of 28 folders the update expert; it is hard; so, I wanna know if there is a way to turn it more usefull 
Anthony Garot
3272
Anthony Garot  
Jhennifher:

do you know how do that?

@Emma Schwatson already posted a python script above. Of course, that means you must have python on your computer. It's not hard to install python.

DOS Batch file would be more primitive, but fairly simple. You could build it yourself in NOTEPAD. Call it something like COPYEA.bat

set SOURCE=C:\....\myEA.ex5

copy %SOURCE% C:\....\destination1\
copy %SOURCE% C:\....\destination2\
copy %SOURCE% C:\....\destination3\
copy %SOURCE% C:\....\destination4\
.
.
.
copy %SOURCE% C:\....\destination28\
Jhennifher
1161
Jhennifher  
Anthony Garot:

@Emma Schwatson already posted a python script above. Of course, that means you must have python on your computer. It's not hard to install python.

DOS Batch file would be more primitive, but fairly simple. You could build it yourself in NOTEPAD. Call it something like COPYEA.bat

tks a lot

123
To add comments, please log in or register