
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Developing a Replay System (Part 72): An Unusual Communication (I).
What we create today will be difficult to understand. Therefore, in this article I will only talk about the initial stage. Please read this article carefully, it is an important prerequisite before we proceed to the next step. The purpose of this material is purely didactic as we will only study and master the presented concepts, without practical application.
The entire process in these last two articles was quite interesting. This is mainly due to the approach we had to take to achieve the desired results. I believe many of you have learned and understood the correct way to get MetaTrader 5 to use the order book. Once again, I emphasize that we are talking about a custom symbol. Do not forget this.
It was quite interesting to see that simply by adding the order book, we could allow the mouse indicator to utilize the OnCalculate function, where data is placed into arrays by MetaTrader 5. This significantly streamlines the process since we no longer need to use the iSpread function just to obtain the bar spread.
Without the knowledge presented in those two articles, it would not be possible to retrieve the data through the arguments of the OnCalculate function when the timeframe is greater than one minute. Aside from this, there are no issues in obtaining data via the OnCalculate arguments. However, as soon as custom book events are used, we gain the ability to read the spread directly from the OnCalculate arguments.
But at the end of the last article, I explained a problem that needs to be solved. If it is not addressed, we will be entirely unable to properly use the application. So, for those who are just joining us in this article, let's quickly review what the issue is.
Author: Daniel Jose