Discussion of article "Graphical Interfaces I: Testing Library in Programs of Different Types and in the MetaTrader 4 Terminal (Chapter 5)"

 

New article Graphical Interfaces I: Testing Library in Programs of Different Types and in the MetaTrader 4 Terminal (Chapter 5) has been published:

This article is the continuation of the first part of the series about graphical interfaces. The first article Graphical Interfaces I: Preparation of the Library Structure (Chapter 1) considers in detail what this library is for. A full list of the links to the articles of the first part is at the end of each chapter. There you can also find and download a complete version of the library at the current stage of development. The files must be located in the same directories as in the archive.

In the previous chapter of the first part of the series about graphical interfaces, the form class was enriched by methods, which allowed managing the form by pressing its controls. Tests were previously conducted for the program of the "Expert Advisor" type and only in the MetaTrader 5 terminal. In this article, we will test our work in different types of MQL program such as indicators and scripts. As the library was designed to be cross-platform so it could be used in all MetaTrader platforms, we will also test it in MetaTrader 4.

Using the Library in MetaTrader 4

The library for creating graphical interfaces can be used as it is in the MetaTrader 4 trading platform. Copy all the files of the library and program which were created in this article from the directories of the MetaTrader 5 terminal to the directories of the MetaTrader 4 terminal. The library is nearly ready to use.

The only thing to be added to some library files to avoid compilation errors is an additional specific parameter that will be an instruction to the compiler to use a special strict mode for checking for errors. For that add the following line of code at the beginning of the header files of the library:

#property strict

Do this in the WndContainer.mqh, Element.mqh files and in the main files of the programs. This will prevent errors when compiling code in these files.

If everything is correct and all files are compiled, test all programs from this article in the MetaTrader 4 terminal. Everything should work the same as in the MetaTrader 5 terminal.

Fig. 4. Library test in the Metatrader 4 terminal.

Fig. 4. Library test in the Metatrader 4 terminal

 

Author: Anatoli Kazharski

Reason: