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

To add comments, please log in or register
Jhojan Alberto Tobon Monsalve
292
Jhojan Alberto Tobon Monsalve  

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".

 

Stanislav Korotky
24522
Stanislav Korotky  
Use functions ObjectGetDouble(... OBJPROP_PRICE ...), ObjectGetInteger(... OBJPROP_TIME ...) - see docs for details.
Jhojan Alberto Tobon Monsalve
292
Jhojan Alberto Tobon Monsalve  
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) ?

Fernando Carreiro
4315
Fernando Carreiro  
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
Jhojan Alberto Tobon Monsalve
292
Jhojan Alberto Tobon Monsalve  
Fernando Carreiro:

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


Identifier

Description

Property Type

OBJPROP_PRICE

Price coordinate

double    modifier=number of anchor point

 OBJPROP_TIME Time coordinate datetime   modifier=number of anchor point

Thank you very much

To add comments, please log in or register