Drawing a simple line in Metatrader 4 without it continuing?????

 
Is there a way to draw a simple line in metatrader without having it continue all the way across the screen or have it trend on?
Quite annoying as I sometimes just want to draw simple target points or minor S&R lines.
 
SanMiguel:
Is there a way to draw a simple line in metatrader without having it continue all the way across the screen or have it trend on?
Quite annoying as I sometimes just want to draw simple target points or minor S&R lines.

Instead of a line, draw it as triangle, with 3 collinear points. However, some lines will really look like triangles, because I remember MT4 rounds some of the point coordintes.

 
SanMiguel:
Is there a way to draw a simple line in metatrader without having it continue all the way across the screen or have it trend on?
Quite annoying as I sometimes just want to draw simple target points or minor S&R lines.

Use the OBJPROP_RAY property to turn off the trending. The following (entirely arbitrary) example draws a line from the low 10 bars ago to the high 5 bars ago.


   string strObjectName = "Example line";

   ObjectCreate(strObjectName, OBJ_TREND, 0, Time[10], Low[10], Time[5], High[5]);

   ObjectSet(strObjectName, OBJPROP_RAY, false);


 
SanMiguel wrote >>
Is there a way to draw a simple line in metatrader without having it continue all the way across the screen or have it trend on?
Quite annoying as I sometimes just want to draw simple target points or minor S&R lines.

If you are talking about drawing a tendline on the screen manually try this:

draw a trendline anywhere. double click on it, and 3 tiny boxes appear, right click and a dialogue box opens, select properties,then in the parameters tab uncheck the "RAY" box.

HTH

Keith

 
Keith:

If you are talking about drawing a tendline on the screen manually try this:

draw a trendline anywhere. double click on it, and 3 tiny boxes appear, right click and a dialogue box opens, select properties,then in the parameters tab uncheck the "RAY" box.

HTH

Keith

thanks...this worked.

 
harveybillions: thanks...this worked.

Don't resurrect nine year old threads without a very good reason.

 
Thanks Keith. 
Reason: