Object time bug

 

The object time retrieved using:

ObjectGetInteger(0,"testObj",OBJPROP_TIME,1)

which is the second point, is always wrong.

Doesn't matter if it's a square or a trendline.


Here is the test code:


   double arrprice[];
   datetime arrtime[];
  
   datetime time1,time2;
   double price1,price2;

   CopyTime(NULL,0,5,1,arrtime);
   time1=arrtime[0];
   CopyTime(NULL,0,0,1,arrtime);
   time2=arrtime[0];
  
   CopyHigh(NULL,0,5,1,arrprice);
   price1=arrprice[0];
   CopyLow(NULL,0,0,1,arrprice);
   price2=arrprice[0];
  

   ObjectCreate(0,"testObj",OBJ_RECTANGLE,0,time1,price1,time2,price2);
   ObjectSetInteger(0,"testObj",OBJPROP_SELECTABLE,1);
   Print(ObjectGetInteger(0,"testObj",OBJPROP_TIME,0));
   Print(ObjectGetInteger(0,"testObj",OBJPROP_TIME,1));    
   Print((datetime)ObjectGetInteger(0,"testObj",OBJPROP_TIME,0));
   Print((datetime)ObjectGetInteger(0,"testObj",OBJPROP_TIME,1));
  
   Print(ObjectGetDouble(0,"testObj",OBJPROP_PRICE,0));
   Print(ObjectGetDouble(0,"testObj",OBJPROP_PRICE,1));
 
Thank you for message. Bug fixed, wait for updates.