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
Well CopyRates() and the other Copy..()-functions 'find' the left end bar of the data hole like iBarShift() - so this is not the problem!
But how do I get with the Copy..()-function easily on the 'other side' of the data hole - this I'd like to know!
But when you say:
how would you do it?
The problem is I don't know what you are trying to do exactly, so difficult to help.
EDIT: I would say, show your code if you need coding help. How do you know there is a hole, in the first place ?
The problem is I don't know what you are trying to do exactly, so difficult to help.
??
I 'landed' in the past at the last valid bar with iBarShift() and/or CopyTime(), CopyRates(), ..
Now I want to get the next valid bar which is the first bar after the data hole.
My situation is as follows (s.a.)
But
Any intelligent solution with MQL5-functions to get on the other side of the hole?
I am so angry as I did not expect this behaviour of the MQL5-function and I ended up in an endless loop of an indicator so that I had to kill the terminal and I lost some important charts :(
But there is another problem!
I consider that MQL5 with its functions might be caught in an endless loop if there is a data hole in the quotes of the history!
And this might influence not only it's own program but all the other programs running on the terminal as all of a sudden the terminal does not respond any more and has to be killed and restarted after it has been detected: VPS...?
That means that I have to check that myself after every request of theses functions as
And I guess data holea are not very likely but can appear and a good system should be able to handle that in a proper and robust way!
??
I 'landed' in the past at the last valid bar with iBarShift() and/or CopyTime(), CopyRates(), ..
Now I want to get the next valid bar which is the first bar after the data hole.
Any intelligent solution with MQL5-functions to get on the other side of the hole?
I am so angry as I did not expect this behaviour of the MQL5-function and I ended up in an endless loop of an indicator so that I had to kill the terminal and I lost some important charts :(
I am really not interested by the eternal and senseless discussion between mql4 and mql5 supporters. You have something to solve, use the language, as it is, to solve it. Your problem is you are trying to apply one language logic to an other language.
I already said you how to do, let me repeat more clearly ;
For me it's fine have make some stuff yourself ( thinking in MT4 missing features) but I miss a way to can map symbol rates and haven't use copy to buffer. And CopyXXX family needs method for add data to buffer and not use zero index approach. Really CopyXXX method for read one value it's very slow ( 10X slower). It's an unnecessary overhead. If MT5 is a new platform why uses old mt4 behavior in many APIs?
For me it's fine have make some stuff yourself ( thinking in MT4 missing features) but I miss a way to can map symbol rates and haven't use copy to buffer. And CopyXXX family needs method for add data to buffer and not use zero index approach. Really CopyXXX method for read one value it's very slow ( 10X slower). It's an unnecessary overhead. If MT5 is a new platform why uses old mt4 behavior in many APIs?
MT5 provides devs with a deeper access to terminal data. You as a developer can make a class or function to store reused data in memory for later use instead of re-copying buffers. This is all up to you how you want to handle memory management in your code. If you don't like the Core libs features then use a third party lib or make your own. That's the beauty of MQL5 - you have access to a greater variety of functionality due to the less restrictive API.
MT5 provides devs with a deeper access to terminal data. You as a developer can make a class or function to store reused data in memory for later use instead of re-copying buffers. This is all up to you how you want to handle memory management in your code. If you don't like the Core libs features then use a third party lib or make your own. That's the beauty of MQL5 - you have access to a greater variety of functionality due to the less restrictive API.
It's not the way. Terminal have all data updated automatically then it's easier if they let map symbol buffers directly. If you want modify data it's when you use CopyXXX. And you don't forget indicators are reloaded everytime you change chart symbol or TF making this kind of tasks not optimal. Really exists that buffer mapping in oncalculate event but you don't have it with other symbols different to chart.
PS: Problem is not make your own implementation. Problem is can't access some parts forcing to use ugly implementations less efficient
The difference is big if MT5 supports symbol history mapping. First run simulate that. All runs are with compiler optimizations