This website stores cookies on your computer. These cookies are used to collect information about how you interact with our website and allow us to remember you. We use this information in order to improve and customize your browsing experience and for analytics and metrics about our visitors both on this website and other media. To find out more about the cookies we use, see our
If you decline, your information won't be tracked when you visit this website. A single cookie will be used in your browser to remember your preference not to be tracked
CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 64 % of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.
Hello, I cannot seem to get the ZMQ EA to perform basic tasks reliably or at all.
“Resource timeout… please try again.”
If I subscribe:
it will tell me the Kernel subscribed but _zmq._Market_Data_DB.keys()
will respond with dict_keys(), meaning there is no data for EURUSD.
I’ll get “KeyError: 'EURUSD” when I _zmq._Market_Data_DB[‘EURUSD’] eventhough it saids it is subscribed.
I am wondering whether I have this EA installed correctly or it is bugged.
When I go into the dependencies, I see a ton of red flags (please see attached picture). I followed the instructions on the site to a T, dropping the Zml and Mql folders into Include as-is, putting libsodium.dll and libzmq.dll into the Libaries folder, and also installed pyzmq via pip install pyzmq in command line. The EA is in the experts folder and I did a %run for the .py file before running the commands in the Ipython shell.
I am at a loss now as to how to make this work. I need this ZMQ EA to come to a place where I can trust it to work so I can continue developing my algorithm. The idea of binding Python to MT4 is extremely promising.
Thank you so much for your help and for your time.
I also want to add that even when MT4 is not running, if I run _zmq = DWX_ZeroMQ_Connector(), it will still return
[INIT] Ready to send commands to METATRADER (PUSH): 32768
[INIT] Listening for responses from METATRADER (PULL): 32769
[INIT] Listening for market data from METATRADER (SUB): 32770
so my best guess is that it is actually not successfully connecting to the EA, so my question is how we verify there is actually a connection to the EA and ensure that connection is stable?
@integracore2 thank you for joining this thread. I should be using the latest code from that github as I downloaded it 3 days ago (unless there was a change I’m unaware of).
I am entirely new to Python and MQL4 the code in the script is a bit beyond my understanding. However, I did follow the playlist at the Darwinex youtube to a T and the intructions on the Github precisely. Is there more that needs to be done to the code in order to get the ZMQ EA to properly bind?
As for the issues with the dependencies, like I said, I installed pyzmq and placed all the Dingmaotu dependency files in the MQL folder. Is there more that I need to do that is not mentioned on the instructions page that maybe perhaps they are just a given assumption for someone who is more experienced?
I see things like ADVAPI32.dll and WS2_32 or MSVCP140.dll that were not included in those files. Am I supposed to retrieve these?
I submitted an issue on Github per your request.
Thank you so much. Really excited to get this up and running.
Thank you for sharing more regarding your situation.
Please note that we cannot provide support for Python or MQL as programming languages themselves.
Therefore, if you are new to Python and MQL, incorporating the project into your specific algorithmic trading environment will require some additional work on your part (i.e. enough Python experience to integrate the Bridge into your environment -> it is assumed that users of the Bridge are self-sufficient in Python).
This is noted on the GitHub README here as well:
Quote from the page:IMPORTANT NOTE: Any code provided and/or referenced in this repository is NOT meant to be used “as-is”. Users must treat all code as educational content that requires modification / incorporation into existing works, as per their individual requirements.
Issues with dependencies hence require some work on the part of users too.
On the README above, links to the dependency projects (mql-zmq, mql-lib, libsodium) are provided.
As these dependencies are beyond our control, any requirements/updates to the same require users to adapt to those changes by following the dependency projects.
In the specific case of mql-zmq for instance, the dependency project’s README states the following: The DLLs require that you have the latest Visual C++ runtime (2015) .
In your screenshot above, there are dependency errors under VCRUNTIME140.dll, implying an issue with Visual C++ runtime libraries (a dependency for the mql-zmq dependency)…
We have drafted as detailed a set of steps as possible in our project README, but cannot cover all the dependencies as they are independent projects on their own that programmers need to account for / follow / keep up to speed with when considering using the DWX ZeroMQ Connector.
As an example of what programmers with experience would do in the situation above (the VCRUNTIME140.dll errors):
Dependencies are showing VCRUNTIME140.dll exception handler errors… what on earth are those?
Step 1 -> Google “vcruntime140.dll”
This will lead to results where other programmers have asked a similar question via a similar search query.
Navigating the various resources in the search results will lead you to the same answer that the authors of the mql-zmq project have stated on their particular README:
VC++ Runtime Libraries are required to be downloaded and installed.
This response is meant to encourage you to bypass the hurdle presented by being new to Python and MQL development, so please take it as friendly advice from someone who has been where you are (and still is from time to time!)
Another piece of advice:
When requesting assistance, replace “it is not working” with “I am getting some errors under Dependencies, specifically to do with calls to VCRUNTIME140.dll. Here’s a log of the errors.”
Not only is this a very specific way to explain the situation to people you’re requesting help from, it also helps you as a programmer to understand your errors and explore solutions better
Hope the above helps, and you’ll certainly be getting a response on GitHub too, no worries.
We’ll need to reproduce the errors you’re getting by simulating an environment without VC++ Runtime libraries installed. So kindly wait until next week for this.
Hope the above proves helpful!
And please do keep the questions coming - it is THE best way to learn anything, particularly in the Darwinex Community… you will not find the level of community support you have here at Darwinex, anywhere else
@integracore2 thank you for you kind response and advice. I will try to phrase my questions and roadblocks in a better way that will elicit a better response.
While i may be new to MQL and Python, I am agressively learning and trying to make sense of the code and hope to arrive at a place of self-sufficiency rather than depence on others. I’ll look into the VC++ Runtime Libraries and then report my results back here!
I read into your advice per your last post and decided to run the ZMQ EA through Windows to eliminate any issues of compatibility.
The only changes in the setup now is I used the dependencies from the MT4 folder instead of the VC2010, and I installed Visual C++ 2015 instead of 2010(since I am no longer using Wine).
So I’d like to report back my results:
just as before, the the same red flags are appearing the in dependencies when the EA is loaded to a chart. I am wondering what else needs to be installed that has been overlooked.
the EA will disconnect with Jupyter Notebook if any adjustments are made to the inputs. Now the connection can be re-established if the MT4 terminal is restarted instead of the having to reboot the machine.
When subscribed to a Symbol, there will be occasional lapses in tick data when invoking _zmq._Market_Data_DB[‘EURUSD’] as I am watching the market movement.
Through this I made the observation that the Market Watch time would be 7/8/2019 00:17, whereas the data coming into the Jupyter Notebook cell would be 21:17 7/7/2019, while the MT4 terminal journal would be 14:17 7/7/2019.
Is there a way to reconcile the time difference between these platforms? In a best-practice case, should GMT be the master time reference?
So my only remaining concerns with the EA is reliability of the connection between MT4 and Python, timestamp consistency, and lapses in tick data.
Also, please note that these are not error flags - they are different function calls, coded in red and green by type.
The green icons are calls to functions from MQL programs, and the red icons are calls to functions within DLLs.
If there are errors during importing a function call from a dependency DLL, they are displayed in your Experts tab in MetaTrader with a message that goes something like "unresolved import function call…"