Installation And Setup Of ZeroMQ, MetaTrader 4, Python IDE On Windows 10 Configuration Instructions
configuration_instructions
configuration_instructions
User Manual:
Open the PDF directly: View PDF .
Page Count: 13
Download | |
Open PDF In Browser | View PDF |
Installation and Setup of ZeroMQ, MetaTrader 4, Python and IDE on Windows 10 Ruslan Masinjila October 23, 2018 Requirements I Windows 10 I Python 2.7 I pyzmq (Python binding for ZeroMQ) I Python IDE I MetaTrader 4 Installation of Python 2.7 Easiest way to install and configure Python is through Anaconda. I Visit Anaconda (https://www.anaconda.com/download/) I Download Anaconda installer for 32-bit Python 2.7 place it on Desktop I Create a folder inside the C directory called Anaconda. This is where installed files will be placed. I Run the downloaded installation file and follow instructions. For the destination folder, select the folder you just created using the browse button. Once selected, the destination path should look like C:\Anaconda\. Click next and proceed with the installation. I At the end of installation, click on Install Microsoft VSCode (recommended). 1 32-bit is required for compatibility with pyzmq 1 and Configuration of Python 2.7 After installation of Python 2.7 through Anaconda, open cmd prompt (Search for cmd from bottom left, near windows icon). Within the terminal, type python followed by Enter. Most likely, ”python” is not recognized... will be displayed. In order to fix this, a path to python has to be set as follows: I Click on search icon near bottom left I Type Environment in the search filed. Then select Edit the System Environment Variable I In the window that pops up, click on Environment Variables.... I Select Path under System Variables and click on Edit... I In the next window that pops up, click on New and paste the address of Anaconda, i.e. C:\Anaconda\. I Click OK in all open windows. Open a new cmd promt and type python. This time it should display python’s version and console. Installation of pyzmq Pyzmq (https://pyzmq.readthedocs.io/en/latest/) provides python bindings for ZeroMQ (http://zeromq.org/) To install pyzmq, first add the path of pip to system variables as explained earlier. Pip is inside the Scripts folder of the Anaconda folder, i.e. C:\Anaconda\Scripts. Thereafter: I Open cmd terminal and type pip. If environment is configured properly, the terminal should display list of available commands for pip. I Type python -m pip install –upgrade pip in the terminal and press Enter to upgrade pip. I Type pip install pyzmq in the terminal and press Enter to install pyzmq. I Type python in the terminal and press Enter to open python console. Then type import zmq and press Enter. Type print zmq.pyzmq version() and press Enter. If no errors occur, the version of pyzmq will be displayed on the terminal. Installation of Python IDE Any Python IDE can be used. The following are instructions to install and configure PyDev in Eclipse IDE. I If Java Runtime Environment (JRE) is not installed on the machine, download JRE from (https://www.java.com/en/download/) I Install the JRE using default settings. I Download Eclipse IDE from (https://www.eclipse.org/downloads/) I Install Eclipse IDE for Java Developers with the default settings I Once Eclipse IDE is installed, launch the IDE using default settings. I Install PyDev for Eclipse IDE using instructions from here (https://bit.ly/2yRroHU). When prompted, choose Install Anyway, then Restart Now Eclipse IDE. Testing IDE with Python and ZeroMQ [1/2] The following are steps to test PyDev and ZeroMQ in Eclipse IDE I On Eclipse IDE, click File→New→Project→PyDev→ PyDev Project I For the Project name write ZEROMQ I Click on Please configure an interpreter before proceeding if the python interpreter is not configured in eclipse. I Click on Quick Auto-Config in the pop-up window and click Next for configuration to complete. I Click Finish followed by Open perspective I Python Project is now created. Use zeromq server.py available at https://bit.ly/2Ja0Ztv and zeromq client.py available at https://bit.ly/2CwfO8t to test ”Hello Wolrd” via pyzmq. First run the server, then run the client. Testing IDE with Python and ZeroMQ [2/2] This is the most important step for the integration of ZEROMQ/pyzmq with PyDev I I I I I I I I In the previous slide, you are likely to get an error (Unidentified variable from import...) after copy-pasting the zeromq server.py and zeromq client.py to the project (ZEROMQ) To fix this error, Go to Windows→Preferences→PyDev→Interpreters→Python Interpreter Click on Forced Builtins Click on New Type zmq Click on Apply Click on Apply and Close Restart Eclipse. All Errors should be gone. Run zeromq server.py then zeromq client.py. The server terminal should print Hello and the client terminal should print World. Installation of MetaTrader 4 Lon into your favourite broker, in this case darwinex (https://www.darwinex.com/) and download MetaTrader 4 (MT 4), which is 32-bit. I Install MT4 and Log in with your Credentials. I IMPORTANT: To enable execution of DLLs, Click on Tools→Options. Then click on Expert Advisors and check Allow DLL imports (potentially dangerous, enable only for trusted applications). Then click OK. Adding mql-zmq bindings to MetaTrader 4 [1/2] Log into your favourite broker, in this case darwinex (https://www.darwinex.com/) and download MetaTrader 4 (MT 4), which is 32-bit. I Before proceeding, make sure that hidden folders in Windows are visible. To make them visible, type folders in the bottom left Search field next to the Windows icon. Then click on File Explorer Options followed by View in the pop-up window. Check Show hidden files, folders, and drives. Then click OK. I Installed MetaTrader 4 files can then be found in C:\Users\user name\AppData\Roaming\MetaQuotes\Terminal\ 3B534B10135CFEDF8CD1AAB8BD994B13 Adding mql-zmq bindings to MetaTrader 4 [2/2] I Now copy or download mql-zmq bindings for MQL language from https://github.com/dingmaotu/mql-zmq and extract the files. I Open the extracted folder, and copy the contents of the Include folder into C:\Users\¡user name¿\AppData\Roaming\MetaQuotes\Terminal\ 3B534B10135CFEDF8CD1AAB8BD994B13\MQL4\Include I Copy the contents of the Scripts folder into C:\Users\user name\AppData\Roaming\MetaQuotes\Terminal\ 3B534B10135CFEDF8CD1AAB8BD994B13\MQL4 \Scripts I Copy the contents of Library\MT4 into C:\Users\user name\AppData\Roaming\MetaQuotes\Terminal\ 3B534B10135CFEDF8CD1AAB8BD994B13\MQL4\Libraries Testing ZEROMQ with MetaTrader 4 and Python I Clone or Download tools and templates from DarwinexLabs (https://github.com/darwinex/DarwinexLabs) then extract the folder. I Copy the contents of tools\MQL4 into C:\Users\user name\AppData\Roaming\MetaQuotes\Terminal\ 3B534B10135CFEDF8CD1AAB8BD994B13\MQL4\Experts Testing Entire Setup I Copy the contents of tools\MQL4 into C:\Users\user name\AppData\Roaming\MetaQuotes\Terminal\ 3B534B10135CFEDF8CD1AAB8BD994B13\MQL4\Experts. I Now open Eclipse IDE and create a python file called zeromq test.py within ZEROMQ project reated earlier. I Copy the contents of the file in tools\Python\ZeroMQ MT4 Python Template.py into zeromq test.py file you just created. I Within MT4, drag-and-drop ZeroMQ MT4 Python Template into an open chart. I Within Eclipse, run zeromq test.py. I If everyting goes well, then within terminas of both Eclipse and MT4 you should see outputs about EUR/USD.
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : Yes Author : Ruslan Masinjila Create Date : 2018:10:23 02:17:33Z Creator : LaTeX with Beamer class version 3.36 Modify Date : 2018:10:23 02:17:33Z PTEX Fullbanner : This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) kpathsea version 6.2.2 Producer : pdfTeX-1.40.17 Subject : Title : Installation and Setup of ZeroMQ, MetaTrader 4, Python and IDE on Windows 10 Trapped : False Page Mode : UseOutlines Page Count : 13EXIF Metadata provided by EXIF.tools