AnchorPoint
Values
Value
Description
Example Usage
// Create a text object anchored at top-left
this.api.CreateChartObject('MyText', TObjectType.TEXT, 0, this.api.Time(0), this.api.Close(0))
this.api.SetObjectProperty('MyText', ObjProp.OBJPROP_ANCHOR_POINT, AnchorPoint.LEFT_TOP)
this.api.SetObjectProperty('MyText', ObjProp.OBJPROP_TEXT, 'Price Level')
// Create a text object anchored at center
this.api.CreateChartObject('CenterText', TObjectType.TEXT, 0, this.api.Time(0), this.api.Close(0))
this.api.SetObjectProperty('CenterText', ObjProp.OBJPROP_ANCHOR_POINT, AnchorPoint.CENTER)
this.api.SetObjectProperty('CenterText', ObjProp.OBJPROP_TEXT, 'Center Label')
// Create a text object anchored at bottom-right
this.api.CreateChartObject('BottomRightText', TObjectType.TEXT, 0, this.api.Time(0), this.api.Close(0))
this.api.SetObjectProperty('BottomRightText', ObjProp.OBJPROP_ANCHOR_POINT, AnchorPoint.RIGHT_BOTTOM)
this.api.SetObjectProperty('BottomRightText', ObjProp.OBJPROP_TEXT, 'Bottom Right Label')Last updated