-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarifying the Purpose of mt5linux for Newcomers #18
Comments
Pardon me, can you explain this part? Sure I can install python for windows and metatrader 5 inside Wine, but how do I run it? Assume I want to place order and no need to run something heavy like you said in point 2. I asked because even I just want to control Metatrader in Wine and just it, I need to use mt5linux to communicate and can't find any way around or am I missing something? |
Hi. Hi you just need to set a To run a Python script you may run |
In addition to gmag11's comment, above... The key is to install both Python and MT5 in the same drive within Wine. Not just install both in Wine, but within the same virtual drive in Wine. With regards to how to run a Python script in Wine, this is something you will have to research. There are a number of ways to do it. One way, for instance, is to use wenv: I am not recommending wenv. It's just one option to play with Python on Wine. Personally, I find this Python+MT5 on Linux is extremely interesting, but it is turning out to be too time consuming and I need to focus on practical solutions for profitable algorithmic trading. For now I will stick with Python+MT5 directly on Windows. Later on, when I am rich from trading with Python+MT5 and have lots of free time I will tackle the fancy stuff that can save you a few USD on VPS fees monthly. |
Yeah, I agree it really is time consuming
How do you go with this solution? I plan to move to this and have 2 options: have a pc to run 24/24 hours with window OS installed on it or build the image to run on window. I want to go with 2nd option but it means I need to bring everything to window. |
One step further, CaoDuyThanh: I want to focus on what's important, so for now, my VPS are going to be Windows VPS. One less complexity out of the way (for now). I will have time to play with Linux, MT5 and Python once I am riding the dollar, if I still want to. So, Python+MT5 on Windows VPS for now. It consumes too much time to master it. It's fascinating, but I have decided to be practical. Sorry that I could not help you further. |
Thanks for the visualization, I was so confused but once I saw the image, it just clicked to me. Thanks! |
Hi,
First of all, thank you Lucas for sharing this excellent work with us all.
Following Lucas' suggestion, I will point out that the description of the purpose of mt5linux and the motivation behind it in the README is rather brief, and for newcomers, like me, with limited experience in running MT5 on Linux, it can be somewhat confusing in its brevity.
I will also try and clarify some of the potential doubts.
1. Do you really need mt5linux?
It depends on your goal. If all you want to do is to run Python and Metatrader 5 on a Linux machine so that your Python-based algorithmic trading system can execute trades via Metatrader 5, then you probably do not need mt5linux. To achieve that goal, all you really need to do is to install both Python for Windows and Metatrader 5 on the same virtual drive in Wine, and install the Metatrader5 library on the Python for Windows. That's it.
2. OK, then, who needs mt5linux?
Let us suppose that you are a machine learning wizard and you use Python for Linux running natively on a Linux machine, where you have installed a zillion heavy libraries, such as Tensorflow in your venv or Anaconda virtual environment. If you now want this pre-existing and very rich Python for Linux to be able to interact with Metatrader 5 installed on the same Linux machine, this is not so easy to accomplish. The Metatrader5 library cannot be used in Python for Linux. It can only be used by Python for Windows.
So, what can you do?
You could install a second instance of Python on the machine. This one a Python for Windows running on Wine. You could then install MT5 on the same Wine virtual drive, and the Metatrader5 library on the Python for Windows. This Python for Windows can then control MT5.
Now, how do you communicate the Python for Linux instance running natively on the Linux machine with the Python for Windows instance running on Wine and controlling MT5?
mt5linux to the rescue!
mt5linux can act as the bridge between these two Python installations, as illustrated by the following diagram:
The text was updated successfully, but these errors were encountered: