Objects Constants
Objects Constants
Object Constants
There are 40 graphical objects that can be created and displayed in the price chart. All constants for working with objects are divided into 9 groups:
- Object types – Identifiers of graphical objects;
- Object properties – setting and getting properties of graphical objects;
- Methods of object binding – constants of object positioning in the chart;
- Binding corner – setting the corner relative to which an object is positioned on chart;
- Visibility of objects – setting timeframes in which an object is visible;
- Gann objects – trend constants for Gann fan and Gann grid;
- Web colors – constants of predefined web colors;
- Wingdings – codes of characters of the Wingdings font.
What’s new in MQL5
Added new objects and analytical tools. The most notable of them is the OBJ_CHART graphical object which is actually a full-fledged chart. It allows creating an unlimited number of nested charts, set all the necessary properties (color scheme, timeframe, symbol) and even impose indicators on them.
Added new properties allowing you to manage a chart object location and visibility more accurately.
| ID | Description | Property Type |
|---|---|---|
| OBJPROP_FILL | Fill an object with color (for OBJ_RECTANGLE, OBJ_TRIANGLE, OBJ_ELLIPSE, OBJ_CHANNEL, OBJ_STDDEVCHANNEL, OBJ_REGRESSION) | bool |
| OBJPROP_SELECTABLE | Object availability | bool |
| OBJPROP_CREATETIME | Time of object creation | datetime r/o |
| OBJPROP_RAY_LEFT | Ray goes to the left | bool |
| OBJPROP_ANCHOR | Location of the anchor point of a graphical object | ENUM_ARROW_ANCHORENUM_ANCHOR_POINT |
| OBJPROP_STATE | Button state (pressed / depressed) | bool |
| OBJPROP_CHART_ID | ID of the “Chart” object (OBJ_CHART). It allows working with the properties of this object like with a normal chart using the functions described in Chart Operations, but there some exceptions | long r/o |
| OBJPROP_PERIOD | Timeframe for the Chart object | ENUM_TIMEFRAMES |
| OBJPROP_DATE_SCALE | Displaying the time scale for the Chart object | bool |
| OBJPROP_PRICE_SCALE | Displaying the price scale for the Chart object | bool |
| OBJPROP_CHART_SCALE | The scale for the Chart object | int value in the range 0-5 |
Last updated on