Download MetaTrader 5

Discussion of article "Extending MQL5 Standard Library and reusing code"

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
188048
MetaQuotes Software Corp.  

New article Extending MQL5 Standard Library and reusing code has been published:

MQL5 Standard Library makes your life as a developer easier. Nevertheless, it does not implement all the needs of all developers in the world, so if you feel that you need some more custom stuff you can take a step further and extend. This article walks you through integrating MetaQuotes' Zig-Zag technical indicator into the Standard Library. We get inspired by MetaQuotes' design philosophy to achieve our goal.

In a nutshell, MQL5 API is intended for you to benefit from code reuse, reliability, flexibility and easy maintenance. This is what the theory says, but beyond all this, if you plan to continue to advance in MQL5 to develop more sophisticated things, such as multi-currency Experts Advisors, you should first be able to code in the Standard Library way so that your apps are guaranteed a successful life. As your EAs and indicators become more and more complex, it is more necessary to master the concepts involved in a framework development. As a real life example, it is my personal need to develop a complex multi-currency EA which dictates the need of strengthening the base of my project from scratch.

Figure 2. We start downloading MetaQuotes' ZigZag from our MT5 Terminal

Author: Jordi Bassaganas

Alexander Piechotta
7094
Alexander Piechotta  

Thank you. Very informative.

Rodrigo Olivares
9
Rodrigo Olivares  

I try to understand what this code means in this article why we have an * near the CINDICATOBUFFER and then use at.  

 

((CIndicatorBuffer*)At(0)).Name("ZIGZAG");
      ((CIndicatorBuffer*)At(1)).Name("HIGH");
      ((CIndicatorBuffer*)At(2)).Name("LOW");

 

I would appreciate a detail explanation

 

thanks  

Alain Verleyen
Moderator
33486
Alain Verleyen  
rodlivar:

I try to understand what this code means in this article why we have an * near the CINDICATOBUFFER and then use at.  

 

((CIndicatorBuffer*)At(0)).Name("ZIGZAG");
      ((CIndicatorBuffer*)At(1)).Name("HIGH");
      ((CIndicatorBuffer*)At(2)).Name("LOW");

 

I would appreciate a detail explanation

 

thanks  

* indicates a pointer. Detailed explanation in this article Using the Object Pointers in MQL5
To add comments, please log in or register