Git Product home page Git Product logo

mql4zmq's Introduction

mql4zmq

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.

Version notes:

If you are using MetaTrader build 509 or earlier, use stable release 1.0.1

If you are using MetaTrader build 600+, use the latest beta 2.0.0-pre

Example Usage:

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

To build:

  1. Download and install Microsoft Visual C++ Express 2010 if you don't already have it.

  2. Download the ZeroMQ v2.1.11 source

  3. Download or git clone the MQL4ZMQ source

  4. Copy the downloaded 'mql4zmq' source folder to: downloaded_zeromq_source_folder\builds\msvc\

  5. 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'
  6. Now that we have the solution open we need to add the mqlzmq project to the solution. To do this:

    1. Right-click on "Solution 'msvc'" then select "add" => "existing project"

    2. 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.
    3. 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.

    4. Make sure the build is set to 'Release' and not 'Debug'. See drop-down in middle of top Visual C++ application menu.

    5. 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'.

    6. 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
      
       
  7. 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".

To use the pre-compiled libraries:

  1. Download and install the Microsoft Visual C++ 2010 Redistributable Package if you don't already have it.

  2. Download or git clone the MQL4ZMQ source

  3. 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
    
     
  4. 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".

mql4zmq's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.