- Object types and features of specifying their coordinates
- Time and price bound objects
- Objects bound to screen coordinates
- Creating objects
- Deleting objects
- Finding objects
- Overview of object property access functions
- Main object properties
- Price and time coordinates
- Anchor window corner and screen coordinates
- Defining anchor point on the object
- Managing the object state
- Priority of objects (Z-Order)
- Object display settings: color, style, and frame
- Font settings
- Rotating text at an arbitrary angle
- Determining object width and height
- Visibility of objects in the context of timeframes
- Assigning a character code to a label
- Ray properties for objects with straight lines
- Managing object pressed state
- Adjusting images in bitmap objects
- Cropping (outputting part) of an image
- Input field properties: alignment and read-only
- Standard deviation channel width
- Setting levels in level objects
- Additional properties of Gann, Fibonacci, and Elliot objects
- Chart object
- Moving objects
- Getting time or price at the specified line points
Objects bound to screen coordinates
The following table lists the names and ENUM_OBJECT identifiers of objects positioned based on the screen coordinates. Almost all of them, except for the chart object, are designed to create a user interface for programs. In particular, there are such basic controls as a button and an input field, as well as labels and panels for visual grouping of objects. Based on them, you can create more complex controls (for example, drop-down lists or checkboxes). Together with the terminal, a class library with ready-made controls is supplied as a set of header files (see the MQL5/Include/Controls directory).
Identifier |
Name |
Setting |
---|---|---|
OBJ_LABEL |
Text label |
Yes |
OBJ_RECTANGLE_LABEL |
Rectangular panel |
|
OBJ_BITMAP_LABEL |
Panel with an image |
Yes |
OBJ_BUTTON |
Button |
|
OBJ_EDIT |
Input field |
|
OBJ_CHART |
Chart object |
|
All these objects require the determining of the anchor corner in the chart window. By default, their coordinates are relative to the upper left corner of the window.
The types in this list also use an anchor point on the object, and only one. It is editable in some objects and is hard-coded in others. For example, a rectangular panel, a button, an input field, and a chart object are always anchored at their top left corner. And for a label or a panel with a picture, many options are available. The choice is made from the ENUM_ANCHOR_POINT enumeration described in the section on Defining the object anchor point.
The text label (OBJ_LABEL) provides text output without the possibility of editing it. For editing, use the input field (OBJ_EDIT).