ObjProp
An enumeration that defines the properties that can be accessed for chart objects.
Values
OBJPROP_TIME1
Time coordinate of the first point
OBJPROP_PRICE1
Price coordinate of the first point
OBJPROP_TIME2
Time coordinate of the second point
OBJPROP_PRICE2
Price coordinate of the second point
OBJPROP_TIME3
Time coordinate of the third point
OBJPROP_PRICE3
Price coordinate of the third point
OBJPROP_COLOR
Object color
OBJPROP_STYLE
Line style (see TPenStyle)
OBJPROP_WIDTH
Line width in pixels
OBJPROP_BACK
Object in background
OBJPROP_RAY
Ray mode for trend lines
OBJPROP_ELLIPSE
Ellipse mode for Fibonacci Arc
OBJPROP_SCALE
Scale for Fibonacci Arc
OBJPROP_ANGLE
Angle for trend lines and Gann tools
OBJPROP_ARROWCODE
Arrow code for arrow objects
OBJPROP_TIMEFRAMES
Visibility in different timeframes
OBJPROP_DEVIATION
Deviation for Standard Deviation Channel
OBJPROP_FONTSIZE
Font size for text objects
OBJPROP_CORNER
Corner for text objects
OBJPROP_XDISTANCE
X distance in pixels for text objects
OBJPROP_YDISTANCE
Y distance in pixels for text objects
OBJPROP_FIBOLEVELS
Number of levels for Fibonacci tools
OBJPROP_LEVELCOLOR
Level color for Fibonacci tools
OBJPROP_LEVELSTYLE
Level style for Fibonacci tools
OBJPROP_LEVELWIDTH
Level width for Fibonacci tools
Example Usage
// Get object coordinates
const time1 = this.api.GetObjectProperty("MyTrendLine", ObjProp.OBJPROP_TIME1);
const price1 = this.api.GetObjectProperty(
"MyTrendLine",
ObjProp.OBJPROP_PRICE1
);
// Get object color
const color = this.api.GetObjectProperty("MyTrendLine", ObjProp.OBJPROP_COLOR);
// Set object properties
this.api.SetObjectProperty("MyTrendLine", ObjProp.OBJPROP_WIDTH, 2);
this.api.SetObjectProperty(
"MyTrendLine",
ObjProp.OBJPROP_STYLE,
TPenStyle.DASH
);
Last updated