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

OTMql4Py - Open Trading Metaquotes4 Python Bridge https://github.com/OpenTrading/OTMql4Py/

This project provides that ability to run a complete Python interpreter under Metatrader4. Mt4 can make calls into Python, using any of Python's commands or imported modules. When coupled with the OTLibProcessCmd.mq4 capabilities of the https://github.com/OpenTrading/OTMql4Lib/ libraries, Mt4 can poll Python for commands to be executed in Mt4 from Python.

This project is based in work by Bernd Kreuss: https://sites.google.com/site/prof7bit/metatrader-python-integration with contributions by C. Polymeris: http://chiselapp.com/user/polymeris/repository/metatraderpy/index

This is a work in progress - a developers' version.

The code is quite stable now, and there should be no major file or API changes. Only Python 2.7.x is supported.

There is now an installer in the Releases section on github.com: see https://github.com/OpenTrading/OTMql4Py/wiki/Installation 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

Source

The source code to generate the py27.dll are in the src directory.

The sources have minor fixes to the original code other than the py26 -> py27 syntactic conversion. The dll checked-in has been recompiled against the current source using MS VC 2010 Express.

Project

Please file any bugs in the issues tracker: https://github.com/OpenTrading/OTMql4Py/issues

Use the Wiki to start topics for discussion: https://github.com/OpenTrading/OTMql4Py/wiki It's better to use the wiki for knowledge capture, and then we can pull the important pages back into the documentation in the share/doc directory. You will need to be signed into github.com to edit in the wiki.

Please report any system it works or doesn't work on in the wiki: include the Metatrader build number, the origin of the metatrader exe, the Windows version, and the Python version and origin of the Python. This code is known to run under Linux Wine (>= 1.7.x), so this project bridges Metatrader to Python under Linux.

If you know of any threads in the forums that discuss this code, please post a message to say this project is now on github.com at https://github.com/OpenTrading/OTMql4Py/

For the project documentation, see the Wiki:

Clone this wiki locally