Draw a line between 2 dots (not a trendline)

 

Hey, 

I was wondering if its possible to draw a line between two dots which starts at coordinate 1 and ends at coordinate 2. 

The problem with trend lines is, that they always go further than the coordinates til infinity - thats not what I need.

 Is is possible to draw such a line with ObjectCreate() ? (or are there other solutions)

 

(Its an EA not an Indicator) 

 

Thanks in advance! 

 
luedman:

Hey, 

I was wondering if its possible to draw a line between two dots which starts at coordinate 1 and ends at coordinate 2. 

The problem with trend lines is, that they always go further than the coordinates til infinity - thats not what I need.

No,  they don't . .  .  turn Ray off.  Use ObjectSet() with property OBJPROP_RAY  set to false