- Object Types
- Object Properties
- Methods of Object Binding
- Chart Corner
- Visibility of Objects
- Levels of Elliott Wave
- Gann Objects
- Web Colors
- Wingdings
The Chart Corner to Which an Object Is Attached
There is a number of graphical objects for which you can set a chart corner, relative to which the coordinates are specified in pixels. These are the following types of objects (in brackets object type identifiers are specified):
- Label (OBJ_LABEL);
- Button (OBJ_BUTTON);
- Bitmap Label (OBJ_BITMAP_LABEL);
- Edit (OBJ_EDIT).
- Rectangle Label (OBJ_RECTANGLE_LABEL);
Object |
ID |
X/Y |
Width/Height |
Date/Price |
|||
---|---|---|---|---|---|---|---|
Text |
— |
— |
Yes |
— |
Yes |
Yes |
|
Label |
Yes |
Yes (read only) |
— |
Yes |
Yes |
Yes |
|
Button |
Yes |
Yes |
— |
Yes |
— |
— |
|
Bitmap |
— |
Yes (read only) |
Yes |
— |
Yes |
— |
|
Bitmap Label |
Yes |
Yes (read only) |
— |
Yes |
Yes |
— |
|
Edit |
Yes |
Yes |
— |
Yes |
— |
— |
|
Rectangle Label |
Yes |
Yes |
— |
Yes |
— |
— |
The following designations are used in the table:
- X/Y – coordinates of anchor points specified in pixels relative to a chart corner;
- Width/Height – objects have width and height. For "read only", the width and height values are calculated only once the object is rendered on chart;
- Date/Price – anchor point coordinates are specified using the date and price values;
- OBJPROP_CORNER – defines the chart corner relative to which the anchor point coordinates are specified. Can be one of the 4 values of the ENUM_BASE_CORNER enumeration;
- OBJPROP_ANCHOR – defines the anchor point in object itself and can be one of the 9 values of the ENUM_ANCHOR_POINT enumeration. Coordinates in pixels are specified from this very point to selected chart corner;
- OBJPROP_ANGLE – defines the object rotation angle counterclockwise.
In order to specify the chart corner, from which X and Y coordinates will be measured in pixels, use ObjectSetInteger(chartID, name, OBJPROP_CORNER, chart_corner), where:
- chartID - chart identifier;
- name – name of a graphical object;
- OBJPROP_CORNER – property ID to specify the corner for binding;
- chart_corner – the desired chart corner, can be one of the values of the ENUM_BASE_CORNER enumeration.
ID |
Description |
---|---|
CORNER_LEFT_UPPER |
Center of coordinates is in the upper left corner of the chart |
CORNER_LEFT_LOWER |
Center of coordinates is in the lower left corner of the chart |
CORNER_RIGHT_LOWER |
Center of coordinates is in the lower right corner of the chart |
CORNER_RIGHT_UPPER |
Center of coordinates is in the upper right corner of the chart |
Example:
void CreateLabel(long chart_id,
|