The goal of this project is to provide MQL4 bindings for the ZeroMQ networking library.
Licensed under the MIT License. See LICENSE for more information.
See Publish/Subscribe example in examples folder. In general the use is exactly as documented by ZeroMQ and described in the "C" examples in the ZGuide
-
Download and install Microsoft Visual C++ Express 2010 if you don't already have it.
-
Download the ZeroMQ v2.1.11 source
-
Download or git clone the MQL4ZMQ source
-
Copy the downloaded 'mql4zmq' source folder to: downloaded_zeromq_source_folder\builds\msvc\
-
Open the ZMQ build solution at: downloaded_zeromq_source_folder\builds\msvc\msvc
- You may need to right click on it and select: "open with" => "Microsfot Visual C++ 2010 Express"
- It may need to be converted. In which case, select 'next' => 'no' then 'next' => 'finish'
-
Now that we have the solution open we need to add the mqlzmq project to the solution. To do this:
-
Right-click on "Solution 'msvc'" then select "add" => "existing project"
-
A file browser opens up. Go into the 'msvc' folder then the 'mql4zmq' folder and select the 'mql4zmq' project file.
- You should now see the mql4zmq listed as project within the solution.
-
Right-click on the 'mql4zmq' project and select 'Project Dependencies'. Make sure the drop-down 'Projects' menu is set to 'mql4zmq' and then select 'libzmq' in the 'Depends on' list. Select "OK" to complete.
-
Make sure the build is set to 'Release' and not 'Debug'. See drop-down in middle of top Visual C++ application menu.
-
You are now ready to build the solution which will produce the ZeroMQ library (libzmq.dll) and the MQL4ZMQ bindings library (mql4zmq.dll). To do this right-click on the solution and select 'Build Solution'.
-
Once all 8 projects within the solution have completed building, we need to copy the files the MetaTrader needs to the location it needs them as follows:
[downloaded_zeromq_source_folder]\builds\msvc\Release\mql4zmq.dll => c:\Program Files (x86)\[metatrader directory]\experts\libraries\mql4zmq.dll [downloaded_zeromq_source_folder]\lib\libzmq.dll => c:\Windows\SysWOW64\libzmq.dll [downloaded_zeromq_source_folder]\builds\msvc\mql4zmq\mql4zmq.mqh => c:\Program Files (x86)\[metatrader directory]\experts\include\mql4zmq.mqh [downloaded_zeromq_source_folder]\builds\msvc\mql4zmq\examples\mql4zmq.mq4 => c:\Program Files (x86)\[metatrader directory]\experts\mql4zmq.mq4
-
-
You are now ready to open up metatrader, attach the example mql4zmq expert to the chart, and be off and running.
- NOTE: when attaching to the chart make sure to select "Allow DLL Imports" and de-select "Confirm DLL Function Calls".
-
Download and install the Microsoft Visual C++ 2010 Redistributable Package if you don't already have it.
-
Download or git clone the MQL4ZMQ source
-
Copy the following files to the following locations for MetaTrader:
[downloaded_mql4zmq_source_folder]\pre-compiled\mql4zmq.dll => c:\Program Files (x86)\[metatrader directory]\experts\libraries\mql4zmq.dll [downloaded_mql4zmq_source_folder]\pre-compiled\libzmq.dll => c:\Windows\SysWOW64\libzmq.dll [downloaded_mql4zmq_source_folder]\mql4zmq.mqh => c:\Program Files (x86)\[metatrader directory]\experts\include\mql4zmq.mqh [downloaded_mql4zmq_source_folder]\examples\mql4zmq.mq4 => c:\Program Files (x86)\[metatrader directory]\experts\mql4zmq.mq4
-
You are now ready to open up metatrader, attach the example mql4zmq expert to the chart, and be off and running.
- NOTE: when attaching to the chart make sure to select "Allow DLL Imports" and de-select "Confirm DLL Function Calls".