Discussing the article: "Developing a Replay System (Part 31): Expert Advisor project — C_Mouse class (V)"

 

Check out the new article: Developing a Replay System (Part 31): Expert Advisor project — C_Mouse class (V).

We need a timer that can show how much time is left till the end of the replay/simulation run. This may seem at first glance to be a simple and quick solution. Many simply try to adapt and use the same system that the trading server uses. But there's one thing that many people don't consider when thinking about this solution: with replay, and even m ore with simulation, the clock works differently. All this complicates the creation of such a system.

Looking at the C_Mouse class system and the analytical classes shown in previous articles, you can notice that when used in a live market, be it a demo or real account, the timer will always tell you when the next bar will start. But when using a replication/simulation system, we don't count on that. Here we get a message. At first glance, it may seem that such a violation of symmetry is not particularly significant. But if we allow useless things to accumulate without correcting or removing them, we will end up with a pile of completely useless junk that will only hinder the solution of issues we really need to solve. We need a timer that can show how much time is left till the end of the replay/simulation run. This may seem at first glance to be a simple and quick solution. Many simply try to adapt and use the same system that the trading server uses. But there's one thing that many people don't consider when thinking about this solution: with replay, and even m ore with simulation, the clock works differently. This happens for several reasons:

  • Replay always refers to the past. Thus, a clock on a platform or computer is by no means a sufficient indication of time.
  • During replay/simulation, we can fast forward, pause, or regress time. The latter case is no longer possible, and this has happened a long time ago for various reasons, which we talked about in previous articles. We can still fast forward and pause. So the timing used on the trading server is no longer appropriate.


Author: Daniel Jose

Reason: