MetaTrader 5 Python User Group - how to use Python in Metatrader - page 22

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Moved now to this thread.
I am also studying Python, but only as part of mastering neural networks, machine learning and other fancy stuff and packages. I do not think it is possible to work with this super-brainer, it is 200 times slower than MQL5, I cited the results of some simple tests.
I still haven't understood, is it possible to connect Python modules and call functions from MQL5? Or just Python->MQL5?
With all due respect you just don't know how to prepare it. Reworked your example:
In Python:
This is all on an ancient AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ calculator, I think on MQL5 the value will be around 12 sec.
(I don't know how to run MQL code on linux.)
So Python with jit compiler beats C (mql) by 2 times! If I run it on modern 8 Core CPU it will beat 8 times, simply because it's multi-threaded.
But even in one thread Python result is 9.6 seconds - so it's still faster. And you can also run it on a video card with CUDA.
For example I can't write multi-threaded analogues in C or MQL - I won't be able to write loky, races and crashes, plus the code will be much larger.
Question to MetaTrader developers: are you going to add call of trading functions from Python?
I would also like a function in Python to subscribe to tick events from the terminal, so when a tick comes the message will be sent to Python.
I know that there are third-party developments of these functions, but I would like to have them out of the box.
You can also try to write multi-threaded code in GoLang for fun, in one thread it is comparable in speed to C.mql5
i7 on virtual machine, allocated 2 cores, 4 threads
What kind of processor do you have? Run my code in C to compare it with.
If it's an i7 it's probably 25 times faster than my AMD, if not more. I need a test in the same languages for the report point.
What kind of processor do you have? Run my code in C to compare it with.
C
i7 onvirtual machine, allocated 2 cores, 4 threads
Py
i7 on Linux, 4 cores, 8 threads
Great result ! And quickly written. Anyone who says python is slow can be sent to see the test results here.
Run more python code in one thread on your processor (parallel = False)
For a full test.
Sad to say, number crunchers have only gone up by about 12 times in the last 15 years, I thought modern CPUs were faster.(parallel = False)
Great result ! And quickly written. Anyone who says python is slow can be sent to see the test results here.
Run more python code in one thread on your processor (parallel = False)
For a complete test.
They were posted a long time ago but they prefer to compare it with pure python which makes no sense ) pure python is designed for other purposes