How Can I Use an MQL4 Indicator to Create an EA in Python?

 

Hello everyone,

I am interested in developing an Expert Advisor (EA) using Python and would like to incorporate an indicator developed in MQL4 into the process. Could someone guide me on how to integrate an MQL4 indicator within an EA programmed in Python?

Specifically, I would like to understand:

  1. Communication Between Python and MQL4: What are the best practices for enabling a Python script to interact with an MQL4 indicator? Are there any recommended libraries or APIs to facilitate this communication?

  2. Indicator Conversion: Is it necessary to convert the MQL4 indicator to a language compatible with Python, or is there a way to use it directly?

  3. Execution and Synchronization: How can I ensure that the MQL4 indicator data is updated in real-time and synchronized with the Python EA for efficient decision-making?

  4. Examples or Resources: Are there any examples of similar projects or resources/documentation that could help me implement this integration?

Thank you in advance for your help and tips!

 
Hydra Corporation:

Hello everyone,

I am interested in developing an Expert Advisor (EA) using Python and would like to incorporate an indicator developed in MQL4 into the process. Could someone guide me on how to integrate an MQL4 indicator within an EA programmed in Python?

Specifically, I would like to understand:

  1. Communication Between Python and MQL4: What are the best practices for enabling a Python script to interact with an MQL4 indicator? Are there any recommended libraries or APIs to facilitate this communication?

  2. Indicator Conversion: Is it necessary to convert the MQL4 indicator to a language compatible with Python, or is there a way to use it directly?

  3. Execution and Synchronization: How can I ensure that the MQL4 indicator data is updated in real-time and synchronized with the Python EA for efficient decision-making?

  4. Examples or Resources: Are there any examples of similar projects or resources/documentation that could help me implement this integration?

Thank you in advance for your help and tips!

NOTE-1: You need to do your own homework 

Documentation on MQL5: Python Integration

https://www.mql5.com/en/forum/ 445467/page3#comment_46238515


https://www.mql5.com/en/articles/14135

NOTE-2: Traders and coders are working for free:

  • if it is interesting for them personally, or
  • if it is interesting for many members of this forum.

Freelance section of the forum should be used in most of the cases.

MQL5 Integration: Python
MQL5 Integration: Python
  • www.mql5.com
Python is a well-known and popular programming language with many features, especially in the fields of finance, data science, Artificial Intelligence, and Machine Learning. Python is a powerful tool that can be useful in trading as well. MQL5 allows us to use this powerful language as an integration to get our objectives done effectively. In this article, we will share how we can use Python as an integration in MQL5 after learning some basic information about Python.
 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
@Oleksandr Medviediev #: NOTE-1: You need to do your own homework Documentation on MQL5: Python Integration

The question is about MQL4 not MQL5. MQL4 does NOT have a Python API.

 
Hydra Corporation:

Hello everyone,

I am interested in developing an Expert Advisor (EA) using Python and would like to incorporate an indicator developed in MQL4 into the process. Could someone guide me on how to integrate an MQL4 indicator within an EA programmed in Python?

Specifically, I would like to understand:

  1. Communication Between Python and MQL4: What are the best practices for enabling a Python script to interact with an MQL4 indicator? Are there any recommended libraries or APIs to facilitate this communication?

  2. Indicator Conversion: Is it necessary to convert the MQL4 indicator to a language compatible with Python, or is there a way to use it directly?

  3. Execution and Synchronization: How can I ensure that the MQL4 indicator data is updated in real-time and synchronized with the Python EA for efficient decision-making?

  4. Examples or Resources: Are there any examples of similar projects or resources/documentation that could help me implement this integration?

Thank you in advance for your help and tips!

MQL4 does not have a Python API, unlike MQL5.

In is beyond the scope of this forum on how to implement an EA or Indicators in pure Python and somehow connecting it to MetaTrader 4 which does NOT have an API for it.

Consider upgrading to MetaTrader 5 instead.