GObject.Type.RegressionLine

Linear Regression

Description

Sets the type to Linear Regression for a graphic object (RegressionLine)

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 doesn't exist, then create it and set its properties
if (!newObject) {
     newObject = this.createObject(GObject.Type.RegressionLine, objectName)
         // set the coordinates of point 1 
         .setTime1(Time[135])
         .setPrice1(High[135])
         // зададим координаты точки 2
         .setTime2(Time[100])
         .setPrice2(High[100]);
}