Discussion of article "LifeHack for traders: Fast food made of indicators"

 

New article LifeHack for traders: Fast food made of indicators has been published:

If you have newly switched to MQL5, then this article will be useful. First, the access to the indicator data and series is done in the usual MQL4 style. Second, this entire simplicity is implemented in MQL5. All functions are as clear as possible and perfectly suited for step-by-step debugging.

Now, after 12 years, such claims seem strange but the history repeats itself. Just like in 2005, some traders declare that MQL5 is complicated for learning and developing strategies compared to MQL4. This means that the overall level of developing trading robots has grown substantially over the years thanks to the fact that the developer was not afraid to move on providing algorithmic traders with even more powerful tools of the C++ language. The new MQL5 allows programmers to check results of all operations in maximum detail (this is especially important for handling trades) and consume RAM on demand. The old MQL4 provided much less opportunities of that kind before it was improved to MQL5 level. Besides, the syntax itself was less strict.

I believe, that debates about MQL5 complexity will also pass into oblivion after a short while. But since many traders still feel nostalgic about "good old MQL4", we will try to show how familiar MQL4 functions may look if implemented in MQL5.

"MACD MQL4 style EA short.mh5" in tester


Author: Vladimir Karputov

 

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.

 
Alain Verleyen:

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.

I don't think you are right. This article firstly helps not so educated and flexible hobby programmers to understand the handling of the indicators in mql5 compared to mql4 and shows them secondly a way how they can use indicators the same way they are used to in 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.

 
Mark only
 

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] ?

 
ludoz:

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.