Build an EA quantitative trading structure, you can use external python to perform AI operations (including EA code)

The overall idea is that mql4 and python communicate through zeromq , and mql4 accepts python's order to open and close positions. Examples are as follows:

Installation Tutorial

  • clone the code down
  • Turn off antivirus software! ! !
  • Unzip MT4 configuration file.rar
  • Put the Include in the Include folder of MT4
  • Put the things in Library/X86/ under the Library folder of MT4
  • Put ZeroMQ_MT4_EA_Template_Edited.mq4 in the Experts folder of MT4
  • pip install pyzmq
  • pip install TA_Lib-0.4.17-cp35-cp35m-win_amd64.whl (version can be downloaded here: https://www.lfd.uci.edu/~gohlke/pythonlibs/ )

Start EA script

  • Open MT4, drag ZeroMQ_MT4_EA_Template_Edited.mq4 into the graph you want to trade at the bottom left, and allow EA to add external DLL and automatic trading
  • There will be a crying face in the upper right corner, indicating that it has not started
  • Click [Automatic Trading], and the crying face turns into a smiling face, and the startup is successful
  • Modify and run the automated EA script.py for testing

Effect

Pay attention to the two EAs that the author is building:

Easy Deal.ex4icon-default.png?t=N6B9https://blog.csdn.net/aa84758481/article/details/128343585

Nerve Knife.ex4icon-default.png?t=N6B9https://blog.csdn.net/aa84758481/article/details/126648698

 

Guess you like

Origin blog.csdn.net/aa84758481/article/details/132130964