I too have multiple MetaTrader installations on my PC and on VPS and this is how I handle the situation.
Firstly, I have a single MQL4 (or MQL5) folder setup on my OneDrive directory. This mainly for saving to the cloud (backup) and for shared access with my VPS.
Then I use NTFS junction points (as mentioned in previous post) to then have that folder be "shared" with each of my MetaTrader installations, on my PC and on my VPS.
When you write code and compile, given that there is essentially only one MQL folder, all source and executable files are available to all installations locally and remotely.
One thing I would like to point out concerning hard links or junctions, you need to be aware, the filesystem does not consistently communicate filehandles, as they differe in their path.
What I mean is following. Lets say you have one source folder and you have a hard link set up to show that source folders contetn on a different spot within the filesystem, when you start editing a file, following needs to be considered:
Opening a file in the original source location, and opening the same file using the junction/hard link, the second editor will not be informed of updates to the file as you save the file in the source location/first editor. And vice-versa.
This means, you have to take extra precaution to not edit the same file in two locations at the same time. - They will unnoticed overwrite each other.
Very unplesant behaviour of NTFS, but thats the way it is. - Only way around this is using a cluster filesystem, which (I suspect) is not available to you, as it is part of the Windows Server Datacenter edition only.
Just be careful when editing the same file from "shadowed" locations at the same time.
@Dominik Christian Egert, actually, it is not the the NTFS which is misbehaving, but the applications that are misbehaving. NTFS does in fact behave correctly and report the updates, but if the application does not monitor this and act accordingly, it will not update. This is the case of MetaEditor.
However, if you use an editor that does monitor this, for example VSCode, then the situation is in fact detected and the file updated with the new content. Here is a short GIF animation showing this. On the right is MetaEditor with the original file open (a .mq5 file). On the left is VSCode opening a Hard Link of a Junction point (double redirection), an ".mq4" file in another folder. You can see that as soon as I save (compile) the file in MetaEditor it is immediately updated in the VSCode editor (expand the image below, to see the animation):
@Dominik Christian Egert, I think it may be a case of misinterpretation of Microsoft's documentation. To me, it clearly states that the changes to the file attributes are propagated to all links. It is only directories changes that are independent of one another, in the case of hard links in those directories. However Junction points are the equivalent of Hard Links for directories and their properties are also propagated.
Also, given that VSCode is written in JavaScript, I don't see it using any "backdoor" to circumvent the normal NTFS operations.
EDIT: Please note also, that there is a difference between file attributes and file content, and the documentation you quoted is referring to attributes and not content.
Do you think this is a valid tutorial for this procedure?
https://www.youtube.com/watch?v=RrJgH-YiiiY
I have Windows 11 but i think it's the same.
- 2019.01.09
- www.youtube.com
Thanks to everyone for the advice! I do not hide that I did not understand the whole conversation but I am trying to deepen.
Do you think this is a valid tutorial for this procedure?
https://www.youtube.com/watch?v=RrJgH-YiiiY
I have Windows 11 but i think it's the same.
I managed without problems and immediately with this tutorial, it works perfectly and being able to do it even with a cloud service like dropbox or others is very very interesting.
Thanks!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Which then in reality, I think this is already possible, the most correct question is whether it is possible for two metatraders to share the same Expert folder.