Discussing the article: "Market Simulation (Part 10): Sockets (IV)"

 

Check out the new article: Market Simulation (Part 10): Sockets (IV).

In this article, we'll look at what you need to do to start using Excel to manage MetaTrader 5, but in a very interesting way. To do this, we will use an Excel add-in to avoid using built-in VBA. If you don't know what add-in is meant, read this article and learn how to program in Python directly in Excel.

In the previous article Market Simulation (Part 09): Sockets (III), I explained the final step we needed in order to create a mini chat. The purpose was to allow you to start exploring how to work with sockets in MQL5. While this is quite interesting and may be used in the future, here in the context of the replay/simulator application, I have not yet decided exactly how I will implement the order system. The use of sockets is often just a viable alternative for transferring information between different applications, and even across different operating systems. In other words, you can transfer data from a Windows system to a macOS or Linux system without actually needing to know the source or destination system. Because of this, we could even use an apparently modest system to build something more elaborate, such as using a set of Raspberry Pis for dedicated computations. But this is beyond the scope of this article series. The main idea here is to prepare readers for the next stage of development that the replay/simulator will eventually undergo.

However, in the article Market Simulation (Part 06): Transferring Information from MetaTrader 5 to Excel, I showed how you could transfer information between MetaTrader 5 and Excel. And why Excel? The reason is purely educational. We could have used any other program. However, Excel makes it easier to explain what we want to achieve. It is very common to use RTD or DDE to transfer data to Excel, but this type of communication is always unidirectional. In other words, we can only send data to Excel, never quickly read data calculated there, which would allow MetaTrader 5 to use it. Imagine the possibilities this opens: you could use a simple Expert Advisor while placing all calculation logic in Excel to control it. This would enable the Expert Advisor to operate fully automatically, without having to make adjustments and modifications through MQL5. In that case, we would do that directly in VBA. This may seem complex, but with the proper knowledge and willingness to study, you will see that it is relatively straightforward. However, it does require dedication and learning.


Author: Daniel Jose