Discussing the article: "Market Simulation: Position View (XVI)"

 

Check out the new article: Market Simulation: Position View (XVI).

In this article, we will make the necessary changes so that the position indicator displays the financial result. This way, the trader will be able to get an idea of the financial result of an open position. In addition, I will tell you something that many people do not know, even those who have been using MQL5 for a long time: how to use static variables to share memory and avoid declaring a global variable in the main code.

In the previous article “Market Simulation: Position View (XV)”, we finally reached the point where it became possible to explain quite clearly how—and, most importantly, why—the replay/simulation system is implemented in this particular way. I think many of you did not even realize that something like this could be done using MQL5, since I have not found any earlier materials in which the exact approach described in the previous article was applied.

I know that at first glance, this kind of material can be a little intimidating and, in many cases, confusing or even overwhelming for enthusiasts. However, dear reader, I certainly do not want you to give up on this idea or think that what I am talking about is unattainable. Quite the opposite: I want to motivate you to learn and master new programming techniques, broaden your horizons, and break out of your usual routine.

In this article, we will do something simpler, but necessary, so that you can properly absorb the content of the previous article. Here, we will make the position indicator a little more user-friendly and visually appealing.


Author: Daniel Jose