How to get the two points (time1,price1 and time2,price2) from a trend line?

 

I would like to know how can I get the two points (time1,price1 and time2,price2) from a trend line that I drawed manually in the chart, this values are shown into the "right-click menu -> properties -> parameters".

 

 
Use functions ObjectGetDouble(... OBJPROP_PRICE ...), ObjectGetInteger(... OBJPROP_TIME ...) - see docs for details.
 
Stanislav Korotky:
Use functions ObjectGetDouble(... OBJPROP_PRICE ...), ObjectGetInteger(... OBJPROP_TIME ...) - see docs for details.

Thank you SK for your reply, but those functions only give the initial point values, where can I get the final point values (green rectangle in the image above) ?

 
jatm: Thank you SK for your reply, but those functions only give the initial point values, where can I get the final point values (green rectangle in the image above) ?

Read the documentation again. Use the "prop_modifier" parameter to select which "point" to select.

double  ObjectGetDouble(
   long                            chart_id,          // chart identifier
   string                          name,              // object name
   ENUM_OBJECT_PROPERTY_DOUBLE     prop_id,           // property identifier
   int                             prop_modifier=0    // property modifier, if required
   );
long  ObjectGetInteger(
   long                             chart_id,          // chart identifier
   string                           name,              // object name
   ENUM_OBJECT_PROPERTY_INTEGER     prop_id,           // property identifier
   int                              prop_modifier=0    // property modifier, if required
   );

Identifier

Description

Property Type

OBJPROP_PRICE

Price coordinate

double    modifier=number of anchor point

 OBJPROP_TIME Time coordinate datetime   modifier=number of anchor point