How to get the datetime parameters of a Rectangle

 

I want to get the datetime and prices coordinates of a rectangle

price1   = ObjectGetDouble       (ChartNos, objname, OBJPROP_PRICE,0);  

the abvove works fine for price 1 & 2 ( line_id = 0 & 1)

but the

datetime dt1      = ObjectGetTimeByValue  (ChartNos, objname,price1);  

I modified the the above using 0 & 1 ( line_id ) but also didn't work

does not work and I now see the documentation implies (maybe) that this function doesn't apply to a rectangle.

https://www.mql5.com/en/docs/objects/objectgettimebyvalue

Any help appreciated

Documentation on MQL5: Object Functions / ObjectGetTimeByValue
Documentation on MQL5: Object Functions / ObjectGetTimeByValue
  • www.mql5.com
ObjectGetTimeByValue - Object Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Peter Williams: I want to get the datetime and prices coordinates of a rectangle
price1   = ObjectGetDouble       (ChartNos, objname, OBJPROP_PRICE,0);  
time1   = ObjectGetInteger(ChartNos, objname, OBJPROP_TIME,0);  
 
William - many thanks - works fine now
Reason: