GObject.Type.TrendLine

趨勢線

Description

Задаёт графическому объекту тип «Трендовая линия» (TrendLine)

Example

// 設置點1的坐標 
let objectName = "OurObject";
// 檢查是否存在相同名稱的對象 
let newObject = this.getObject(objectName);
// 如果不存在,則創建它並設置其屬性 
if (!newObject) {
     newObject = this.createObject(GObject.Type.TrendLine, objectName)
         // 設置點1的坐標 
         .setTime1(Time[135])
         .setPrice1(High[135])
         // зададим координаты точки 2
         .setTime2(Time[100])
         .setPrice2(High[100])
}