Skip to content

yzportfolio/OTMql4Py

 
 

Repository files navigation

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 (https://github.com/OpenTrading/OTMql4Lib/raw/master/MQL4/Libraries/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:

About

Open Trading Metatrader 4 Python Integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 38.2%
  • C 31.6%
  • Python 22.1%
  • Pascal 8.1%