Discussing the article: "Developing a Replay System (Part 33): Order System (II)"

 

Check out the new article: Developing a Replay System (Part 33): Order System (II).

Today we will continue to develop the order system. As you will see, we will be massively reusing what has already been shown in other articles. Nevertheless, you will receive a small reward in this article. First, we will develop a system that can be used with a real trading server, both from a demo account or from a real one. We will make extensive use of the MetaTrader 5 platform, which will provide us with all the necessary support from the beginning.

One might think, and this is not entirely wrong, that these functions are essentially very basic and cannot completely cover the order system. This is true, but at this early stage we are going to develop a system that will not be used directly in the replay/simulation service. We will develop a system that can work with a real trading server, both on a demo account and on a real one. We will make extensive use of the MetaTrader 5 platform, which will provide us with all the necessary support from the beginning. It is very important to make the system operate flawlessly from the very beginning, when the platform communicates with the server. Because when only replay/simulator is used, we can no longer adapt the Expert Advisor system to our replay/simulator. We must ensure that the replay/simulator matches what the EA is doing. This is why we need to run the EA on a real server first.

This requirement leads to a reduced number of methods and functions in the system, and therefore in the C_Orders class. However, we still remember that we are creating a large system. Make no mistake thinking that the C_Orders class will not be able to meet all our needs. We just need to make the MetaTrader 5 platform give us the maximum support required for working with the trading server. The essence of the maximum support from MetaTrader 5 is to avoid creating things where such creation can be avoided. We should not try to reinvent the wheel but rather use the platform to the maximum so that we put in the least amount of effort when working with the replay/simulator system.

Author: Daniel Jose