Calculate Length of a trend line

 
How can I calculate length of a trend line?

I have a user created trend line on the chart.

how can I get time1_price1 of the trend's first point, and time2_price2 of the trend's second point.

anyone have idea?

 

ObjectGetDouble()

ObjectGetInteger()

 
Keith Watford:

ObjectGetDouble()

ObjectGetInteger()

ObjectGetInteger()  return time of anchor points. what is format of this time?

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Methods of Object Binding
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Methods of Object Binding
  • www.mql5.com
Methods of Object Binding - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
mojtabalife:

ObjectGetInteger()  return time of anchor points. what is format of this time?

for time it returns a datetime (actually a long but it is used as a datetime)

 
There is no format of a datetime — it is seconds from 1970. Question makes no sense.
 
Keith Watford:

for time it returns a datetime (actually a long but it is used as a datetime)

Thanks Keith.