Multiple MT4 using same codebase of scripts/EA

 

Hi,

i want to have multiple MT4 from different brokers, this is primarily due to the fact that i want a large number of symbols to analyze. I have developed some scripts/EA that i use which are very helpful to me for trade signals. i do not want to maintain separate copies of them for each MT4 but rather to have same code base. I was trying to figure out how to do this. if anyone has done this before and has experience or documentation on this, it will be highly appreciated.

thanks,

Kya

 
kyahain:

Hi,

i want to have multiple MT4 from different brokers, this is primarily due to the fact that i want a large number of symbols to analyze. I have developed some scripts/EA that i use which are very helpful to me for trade signals. i do not want to maintain separate copies of them for each MT4 but rather to have same code base. I was trying to figure out how to do this. if anyone has done this before and has experience or documentation on this, it will be highly appreciated.

thanks,

Kya


Every MT4 has its own experts folder

every copy has same code base

you don't have to rename the EA/script/indicator ... if you place it in another MT4 experts folder

Only modifying again might be needed...

 
deVries:


Every MT4 has its own experts folder

every copy has same code base

you don't have to rename the EA/script/indicator ... if you place it in another MT4 experts folder

Only modifying again might be needed...


i want to have same copy of the code base, meaning one physical file, i want to modify them in one common location and not to replicate the changes in several folders of different MT4 brokers.
 
kyahain:

i want to have same copy of the code base, meaning one physical file, i want to modify them in one common location and not to replicate the changes in several folders of different MT4 brokers.
I don't think you have a choice. People running multiple copies of MT4 seem to use different install directories. It really shouldn't be hard to run an XCOPY command in a batch file to copy all the EAs to all the other directories. It is a bit boring to run the script when you release a new EA, but it works with minimal effort and EAs take up very little disk space compared to, for example, all the history data (which is MASSIVE)
 
kyahain:

Hi,

i want to have multiple MT4 from different brokers, this is primarily due to the fact that i want a large number of symbols to analyze. I have developed some scripts/EA that i use which are very helpful to me for trade signals. i do not want to maintain separate copies of them for each MT4 but rather to have same code base. I was trying to figure out how to do this. if anyone has done this before and has experience or documentation on this, it will be highly appreciated.

thanks,

Kya

 

Symlinks!

Symlinks are the most obvious solution for problems like these, why did nobody suggest it? Use one real experts folder where all your EAs are in your first metatrader installation and in all other metatraders remove their experts folders and replace them a symlink to the one and only "real" experts folder from your first mt4.

google for "ntfs symlink" to find information on how exactly to do this.

(or "ntfs junction point" if you are using windows XP which does not yet have full blown symlinks, junction points will also solve your problem)

 
7bit:

Symlinks!

Symlinks are the most obvious solution for problems like these, why did nobody suggest it? Use one real experts folder where all your EAs are in your first metatrader installation and in all other metatraders remove their experts folders and replace them a symlink to the one and only "real" experts folder from your first mt4.

google for "ntfs symlink" to find information on how exactly to do this.

(or "ntfs junction point" if you are using windows XP which does not yet have full blown symlinks, junction points will also solve your problem)


From the beginning i was thinking of a solution along this line, and this is what i tried with. Instead of using symlinks i tried with shortcuts of files in windows and it was a bit boring. thats why asked if anyone else tried to do it to see what is the best practise.

thanks.

 
kyahain:


Instead of using symlinks i tried with shortcuts of files in windows and it was a bit boring.

Yes, shortcuts are something different, they are just ordinary files with some instructions in them for explorer telling it what to do if you double-click on them. They only work with explorer and not with the file system itself. They should not be confused with symlinks.

A symlink is a mechanism much deeper inside the filesystem, making it appear as if it were the target file itself for all intents and purposes, not only for explorer but also for all low level file system operations, it will appear and behave to every program as if it were the linked file (or folder) itself.

Unfortunately you need special tools to create and manage them in windows, they are not part of the explorer UI by default. Symlinks have been used and were commonly known in most other operating systems basically since mankind can remember, but for some strange reason Bill Gates decided to throw away 30 years of knowledge and best practices and start completely from scratch with his toy operating system DOS/Windows, so the windows users had to wait almost two generations until most of these useful features once witnessed by our fathers and grandfathers in their great old unixes from the golden era of true powerful computing slowly started to appear in windows too.

 

Link Shell Extension

Windows actually has it. It's called location re-direct, it only works on personal folder (document, etc) though. Open its property and you'll see location tab.

 
onewithzachy:

Link Shell Extension

Windows actually has it. It's called location re-direct, it only works on personal folder (document, etc) though. Open its property and you'll see location tab.

This is something completely different and does only work for some special folders like your documents folder, it does not operate on the filesystem level, it is only messing with explorer's perception of reality. It has nothing to do with symlinks in the file system.

You need symlinks or hardlinks. They are in the kernel since windows 2000 or XP but nowhere accessible in the UI unless you install some special tool from microsoft or from sysinternals or some other 3rd party tool to access this functionality. Hardlinks exist since Windows 2000 and are called "NTFS Junction Points" and Symlinks exist since Windows Vista and are called "Symlinks".

here is the tool you need: http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html (it will give you a few additional menu items in the windows explorer to expose all this hidden functionality to the user: Right-click and "pick" the original experts folder (or drag with right mouse button) and drop it in the other metatrader as a symlink)

 

There was a recent thread about this topic . . .

https://www.mql5.com/en/forum/137863