Discussion of article "LifeHack for traders: Fast food made of indicators" - page 13
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
- you had a nice code and a description of the measurement results.
I didn't get a chance to look at the code
calling indicators in MQL4 mode, the speed is lower by 40%.
MQL5-style
MQL4-style (without cache)
MQL4-style(with cache)
The cache variant is 32% slower than the MQL5-style variant. As for the cacheless variant, the mentioned 40% could not be obtained. As before, it is twice as slow. But the coincidence in terms of profit is certainly present.
Sorry but I don't even understand why this article was allowed to be published by Metaquotes.
The main advantages of indicator handle in mql5 is the ability to get several values from a buffer, you completely discard it. And that to provide a code which will be largely less efficient most of the time ! I am not even about bad coding practice consisting to not check returned value of a function.
This article is useless or even worst. Don't be surprised people want to keep using mql4.
Sorry but I don't even understand why this article was allowed to be published by Metaquotes.
The main advantages of indicator handle in mql5 is the ability to get several values from a buffer, you completely discard it. And that to provide a code which will be largely less efficient most of the time ! I am not even about bad coding practice consisting to not check returned value of a function.
This article is useless or even worst. Don't be surprised people want to keep using mql4.
If i run a simple iVolume in a loop, over all available instruments, in MQL5, then the platform just freezes up, the massive copybuffer calls act like a ddos attack on the operating system, it just trips, where if i do this same process in MQL4, it runs smooth like a pack of hot molten butter.
On the same machine, and that tells me more then i need to know.
Combine that with all the signals and noise coming from the community which tells me that my conclusions were right all along.
The problem is: why do I have to copy the buffer every time I have to read the indicator value? The buffer is there, already computed, why can't I access it's value directly?
This is a non-sense!
I should only have direct access to the indicator buffer, copying it over and over will only degrade the performance.
I really don't understand why Metaquotes has followed this way of work.
CopyBuffer(...) vs buffer[i] ?
The problem is: why do I have to copy the buffer every time I have to read the indicator value? The buffer is there, already computed, why can't I access it's value directly?
This is a non-sense!
I should only have direct access to the indicator buffer, copying it over and over will only degrade the performance.
I really don't understand why Metaquotes has followed this way of work.
CopyBuffer(...) vs buffer[i] ?
Because that's not so simple. The indicator run on one thread and an EA on an other thread (and you can have several indicators/several EAs). If you are complaining about such a simple procedure as handle/CopyBuffer, you don't want to proceed with multi-threaded application, believe me.
mql5 provides generic solutions, able to manage most of the "normal" situation. If you have specific issue on your project, there are always solution.