Discussing the article: "Developing a Replay System (Part 71): Getting the Time Right (IV)"

 

Check out the new article: Developing a Replay System (Part 71): Getting the Time Right (IV).

In this article, we will look at how to implement what was shown in the previous article related to our replay/simulation service. As in many other things in life, problems are bound to arise. And this case was no exception. In this article, we continue to improve things. The content presented here is intended solely for educational purposes. Under no circumstances should the application be viewed for any purpose other than to learn and master the concepts presented.

In the previous article, "Developing a Replay System (Part 70): Getting the Time Right (III)", I explained the required modifications in the mouse indicator. These changes were aimed at enabling the mouse indicator to receive order book events. This specifically refers to the case when it is being used alongside the replay/simulation application. You, dear reader, may have felt quite frustrated and confused by all those changes. I understand that many of them may not have made any sense at first. They were probably far more complex than I would like them to appear. Nevertheless, it is essential that you fully understand that content, no matter how confusing it may have seemed at first glance. I know that many of you likely struggled to understand what I was trying to convey in that article. However, without understanding that previous content (where I used a much simpler service to demonstrate how the whole mechanism works) trying to comprehend what will be explained here would be significantly more difficult. 

So, before diving into what we'll actually be doing in this article, make sure you've understood what was covered in the previous one. Especially the part about how, by adding order book events to the custom symbol, we gained the ability to use the OnCalculate function in a way that wasn't previously possible. This required us to use an iSpread call to retrieve the data that MetaTrader 5 makes available to us.

In this article, we will actually carry out the transfer (or more precisely, the transcription) of part of that code used in the test service, bringing it into the replay/simulation service. The main issue here isn't how we can do this, but rather how we should go about doing it.

Author: Daniel Jose