MetaTraderPy
MetaTraderPy
Not logged in

NOTE: This code no longer works as of metatrader 4 build 600

The python integration DLL would have to be modified.

This module offers a wrapper around Bernd's Python integration for MetaTrader. The intent is that you don't have to ever handle MQL code.
Currently only a subset of functionality is supported, but the most important code to implement Expert Advisors is there.
To use this, apart from Bernd's code, you need the metatrader counterpart script: python.mqh

Then, subclass the Advisor class in your own python module. The new class must be called Advisor, too, e.g. test.Advisor.

This class can then easely be invoked with the following MQL4 script (a demo is included in the package):

#define PYTHON_MODULE "test"
#include <python.mqh>


That's all you should have to ever bother with MQL4. Have fun!

Contact
Download latest commit as zip
API