GObject.Type.ArrowedLine

箭頭線

Description

將類型設置為圖形對象“帶箭頭的線” (ArrowedLine)

Example

// Let's set the name of the object
let objectName = "OurObject";
// check if an object with the same name already exists
let newObject = this.getObject(objectName);
// if it does not exist, then create it and set its properties
if (!newObject) {
     newObject = this.createObject(GObject.Type.ArrowedLine, objectName)
         // set the coordinates of the beginning of the line
         .setTime1(Time[21])
         .setPrice1(Low[21])
         // set the coordinates of the end
         .setTime2(Time[2])
         .setPrice2(High[2])
         // set the line color
         .setColor(Color.Crimson)
}