Trendline by Angle Tool

 

I use this tool to draw angled trendlines and the default value for the line is a ray. I then deselect the ray option to obtain a shorter line. However when I use that same tool again for a new line it automatically defaults back to a ray line.

Is there a way to toggle that option so that when I use this tool again, the ray default is "off". This would save lots of time of always having to deselect that option everytime I use it.

Best,

 

Here is one way:

Create a new indicator

start(){
  int i;
  for(i = 0; i < ObjectsTotal; i++){
    string name = ObjectName(i);
    if(ObjectType(name) == OBJ_TRENDBYANGLE){
      ObjectSet(name, OBJPROP_RAY, 0);
    }
  } 
  return(0);
}

You draw, on next tick or refresh, it will set it to no ray.

 
How can you calculate this trendline Angle?
 
FinGeR:
How can you calculate this trendline Angle?
TrendLine or Trendline by Angle ?
Reason: