Skip to content
Open Trading edited this page Feb 25, 2016 · 5 revisions

If you are on a 64bit machine, see Python32Or64Bit before going any farther.

Binary Installer

There is now an installer in the Releases section on github: https://github.com/OpenTrading/OTMql4AMQP/releases It's a simple installer that asks where you want the software installed, and the location of your personal AppData Metatrader directory, and copies the files to the right places; it installs a copy of the documentation too. Usually you could just overwrite old releases with new ones, but for now, we recommend uninstalling old releases before installing new ones in case the filenames or locations have changed.

If you have a recent (2016) release of Mt4, the location of your personal Metatrader directory to install into is no longer the Program Files directory (something like c:\Program Files\MetaTrader 4 Terminal) but rather your personal AppData directory (something like c:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\LONGHEXNAME).

When you start Metatrader, look for the Data Directory: message in the Journal log. Usually there are 2 possibilities: if you have a subdirectory of your Users\AppData\Roaming\MetaQuotes\Terminal and then a long hexadecimal name, use it. Otherwise look in c:\Program Files for the Metatrader directory. Use the Browse button to select it, then click Next.

Install from Source

You can just "git clone" or download the zip from github.com and unzip into an empty directory. Then recursively copy the folder MQL4 over the MQL4 folder in your personal AppData... directory (something like c:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\LONGHEXNANE). It will not overwrite any system files, and keeps its files in subdirectories called OTMql4.

Prerequisites

This project requires the prior installation of our MQL4 Python bridge: https://github.com/OpenTrading/OTMql4Py . Again, git clone this from https://github.com and recursively copy it's folder MQL4 over the MQL4 folder of your Metatrader installation, or use the binary in https://github.com/OpenTrading/OTMql4Py/releases . If you are on a 64bit machine, we use 32bit installs even on 64bit machines, because Metatrader in a 32bit application; see https://github.com/OpenTrading/OTMql4Py/wiki/Python32Or64Bit

This project requires the prior installation of [pika|http://pypi.python.org/pypi/pika]] . Any recent version should do; we've tested against http://pypi.python.org/packages/source/p/pika/pika-0.10.0.tar.gz

You may have to set the environment variable PYTHONHOME to the root of your Python installation (e.g. c:\Python27 ).

Attach the OTPyTestPikaEA.mq4 EA to a chart and make sure it's working; look at the Experts log in Mt4 to see messages of success. See TestExperts for a description of Look at the OnTick and OnTimer functions of OTPyTestPikaEA.mq4 .

Clone this wiki locally