Rectagle price

 
How to check the highest and lowest price of a rectangle drawn by a mouse in mql4 ? I drew a rectangle as in the picture, but I want to see the price in mql4, can I make it?








Renctagle price
 
Right click on it and select properties.
 

1) You have to check all objects:  select each object and get it type, if type = rectangle then get it NAME and then get it coordinates

   for(int i=ObjectsTotal()-1; i>=0; i--)
     {
      string name=ObjectName(i);
      if (ObjectType(name)==OBJ_RECTANGLE)
      {
         Price1 = ObjectGet(NAME, OBJPROP_PRICE1);   
         Price2 = ObjectGet(NAME, OBJPROP_PRICE2);   
         Time1 =   ObjectGet(NAME, OBJPROP_TIME1);     
         Time1 =   ObjectGet(NAME, OBJPROP_TIME2); 
         break;
      }
     }
 
Mikhail Zhitnev:

1) You have to check all objects:  select each object and get it type, if type = rectangle then get it NAME and then get it coordinates

Thank you ! It's works  :) 
Reason: