Discussing the article: "Developing a Replay System — Market simulation (Part 25): Preparing for the next phase"
Hey Daniel, good evening!
Firstly thank you very much for this great contribution to everyone who accesses your content.
I can calmly say: "You're the man!".
Daniel, I'd like to raise a point that I don't know if I'm being hasty, but which is of the utmost importance for anyone developing a robot (EA) to operate on top of the Replay service.
Is it possible to make the service trigger the metatrader's OnTick event, so that the running EA can receive each tick processed?
And for the service to wait (not plotting another tick) until the ontick event (if it exists) is executed, so we could debug the robot and the service respects this stop (of the degug).
Thanks in advance!
And for the service to wait (not plotting another tick) until the ontick event (if it exists) is executed, so that we could debug the robot and the service respects this stop (of the degug).
Thanks in advance!
OK, let's go in parts 😁. You're not the first person to ask me that. Which in a way makes me very happy. Because I can see that many people have the same idea. Each at a certain point in the implementation. But the answer is yes and no. But why the ambiguity? The reason is that although it's simple, I don't know exactly what your level of knowledge of MQL5 is. But regardless, you can continue building your Expert Advisor without any problems. All I ask is that you follow carefully and study each article that is posted. Because in order to do what you and everyone else is looking for, you only need to add a single line to your Expert Advisor. This line could already be added at this stage of development of the replay / simulator. But if you're asking this, it means that you don't yet know which line to add. Take it easy. Soon, the articles will begin to explore this functionality, where the use of this same line will be quite frequent. Then you and everyone else will understand how to do it. In other words, you'll understand how to create your own solutions. With a minimum of modifications to the system I'm showing you how to implement.😁👍
PS: Thanks for the compliment. I'm here to show you that MetaTrader 5 is much more than it seems. 😉👍

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Check out the new article: Developing a Replay System — Market simulation (Part 25): Preparing for the next phase.
In this article, we complete the first phase of developing our replay and simulation system. Dear reader, with this achievement I confirm that the system has reached an advanced level, paving the way for the introduction of new functionality. The goal is to enrich the system even further, turning it into a powerful tool for research and development of market analysis.
We'll start by introducing some restrictions on the control indicator so that the user cannot go back in time. By 'going back in time' I mean that after a certain amount of progress, it will no longer be possible to use the control indicator to return to a previous position. To undo the actions, you will need to close the replay/simulation service and restart the process from the beginning. I understand that this limitation may seem daunting, but trust me, this approach will prevent many future problems that may arise when trying to use the go-back functionality.
Implementing this limitation is not difficult, but it does require some effort since you need to add specific tests to the system. These tests must be used with care so as not to create conflicts with other functions of the indicator, allowing it to work effectively. We will break this task down into several steps to make it easier to implement changes in an efficient manner.
Author: Daniel Jose