MQL4 Book  Appendixes

Upgrade to
Book in One File


  • Types of Trades.
    Types of orders that can be used in MetaTrader 4 Client Terminal.
  • Error Codes.
    There is a possibility of an error appearing while program is running. It is necessary to define the handling of the most important errors in advance. You can get the error code by using the GetLastError() function.
  • Styles of Indicator Lines Displaying.
    Custom indicators allow you to display the graphical information using different styles. The DRAW_LINE style can draw lines of a predefined width and style. For DRAW_ARROW style it is necessary to specify the displayed arrow code in the Windings format. The DRAW_SECTION style uses one indicator buffer, while the DRAW_ZIGZAG style requires two indicator buffers: even and odd. Knowing styles of drawing lets you combine different methods of information showing in one indicator.
  • Types and Properties of Graphical Objects.
    There are 24 built-in graphical objects that can be created via a program. This feature allows to provide indicators and EAs with additional abundant visualization tools. Common object properties like, for example, junction point and object color can be set, as well as properties for an individual graphical object. When some object properties have been changed, the object can be immediately (forcedly) redrawn using the WindowsRedraw() function.
  • Wave Files.
    You can redefine the set of the wave files that are used in MetaTrader 4. For doing this open the "Tools"-"Options" window and specify necessary wave files on the "Events" tab. You can play the attached files in your own programs using the PlaySound() function.
  • Function MessageBox() Return Codes.
    The MessageBox() function allows you to organize the interaction between a program and a user during the execution process directly. Processing return codes of the MessageBox() window allows to guide the program running depending on the button pressed by a user. It makes the program more flexible.