Skip to content

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:

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.

IDDescriptionProperty Type
OBJPROP_FILLFill an object with color (for OBJ_RECTANGLE, OBJ_TRIANGLE, OBJ_ELLIPSE, OBJ_CHANNEL, OBJ_STDDEVCHANNEL, OBJ_REGRESSION)bool
OBJPROP_SELECTABLEObject availabilitybool
OBJPROP_CREATETIMETime of object creationdatetime r/o
OBJPROP_RAY_LEFTRay goes to the leftbool
OBJPROP_ANCHORLocation of the anchor point of a graphical objectENUM_ARROW_ANCHORENUM_ANCHOR_POINT
OBJPROP_STATEButton state (pressed / depressed)bool
OBJPROP_CHART_IDID 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 exceptionslong r/o
OBJPROP_PERIODTimeframe for the Chart objectENUM_TIMEFRAMES
OBJPROP_DATE_SCALEDisplaying the time scale for the Chart objectbool
OBJPROP_PRICE_SCALEDisplaying the price scale for the Chart objectbool
OBJPROP_CHART_SCALEThe scale for the Chart objectint value in the range 0-5
Last updated on