Discussing the article: "MetaTrader tick info access from MetaTrader services to python application using sockets"

 

Check out the new article: MetaTrader tick info access from MetaTrader services to python application using sockets.

Sometimes everything is not programmable in the MQL5 language. And even if it is possible to convert existing advanced libraries in MQL5, it would be time-consuming. This article tries to show that we can bypass Windows OS dependency by transporting tick information such as bid, ask and time with MetaTrader services to a python application using socket

This article focuses on utilizing MetaTrader’s 5 services program to send tick info such as bid, ask and time to a python server and the python server will broadcast the info to all the client sockets which are connected to the server. This is more clear in the following figure.

Socket data flow

As you can see from the figure, the MetaTrader service program is connected to a python server listening on port 9070. All the tick data of the charts that are open in MetaTrader 5 terminal, will be sent to the python server at port 9070. The Python server then analyzes the data received from MetaTrader 5, does the necessary analysis on the data and distributes or better say broadcasts the tick info to the connected clients. The clients can then use the received data to perform necessary tasks or apply algorithms to achieve the desired result, which can be transmitted back to the MetaTrader services program for further processing.


Author: lazymesh

 
Interesting work. Is it possible to create in this way a risk management server for a network of terminals listening to it?
 
Good and useful article, congratulations. 
 
Alain Verleyen #:
Nice and useful article, congratulations.

Thanks

 
Yevgeniy Koshtenko #:
Interesting work. Is it possible to create a risk management server in this way for a network of terminals listening to it?

yes, it is possible

 
Yevgeniy Koshtenko #:
Interesting work. Is it possible to create in this way a risk management server for a network of terminals listening to it?
Yes it is possible, depends on the latency you can tolerate