How to integrate a custom MQL5 indicator with Python to receive real-time data?

 

Hi, community!

I have developed two custom indicators in MQL5: a currency strength indicator and an RSI indicator. I would like to integrate them with a Python tool so that, whenever I start my Python application, it directly receives real-time data from the indicators without saving it locally (e.g., as JSON files).

Is there any way to establish a direct connection between MetaTrader 5 and Python to fetch this data in real-time? Any tips on using APIs, sockets, or similar solutions for this purpose?

Thanks in advance for your help!

 
Documentation on MQL5: Python Integration
Documentation on MQL5: Python Integration
  • www.mql5.com
MQL5 is designed for the development of high-performance trading applications in the financial markets and is unparalleled among other specialized...
 
 
Hydra Corporation: I have developed two custom indicators in MQL5: a currency strength indicator and an RSI indicator. I would like to integrate them with a Python tool so that, whenever I start my Python application, it directly receives real-time data from the indicators without saving it locally (e.g., as JSON files). Is there any way to establish a direct connection between MetaTrader 5 and Python to fetch this data in real-time? Any tips on using APIs, sockets, or similar solutions for this purpose?

Thanks in advance for your help!

No, there is no pre-established API for that. You will have to develop your own method of communication between the two systems.

The simplest solution would be to write the data to shared files, but if that is not what you want, then perhaps using MQL5 sockets instead would suit you.