EA how to get the time[0] or time[1] arrow object and value (indicators draw the arrow)

 
int init()
  {
//---- my indicators example code. just draw two arrow 
//----
    ObjectCreate ("Arrow0",OBJ_ARROW,0,Time[0],Close[0]);
    ObjectSet ("Arrow0",OBJPROP_COLOR,White);
    ObjectCreate ("Arrow1",OBJ_ARROW,0,Time[1],Close[0]);
   return(0);
}
// in my EA start function 
// i just want to get before bar Time[1] have arrow , if have i can send order. but i try to use ObjectGet(Name,1) to get Time[1] //object seems doesn't work, i don't know how to get object.


int start()
  {
   int obj_total=ObjectsTotal();
   Print("Process:",obj_total);
   string name;
   for(int i=0;i<obj_total;i++)
   {
      name=ObjectName(i);
      Print(name);
      double o1 = ObjectGet(name,0);
      double o2 = ObjectGet(name,1);
      if (o1  > 0 && o1 <1000)
      {
          Print("this is today object(current bar)",o1);
      }
      if (o2  > 0 && o2 <1000)
         Print("this is yesterday object(before bar)",o2);
      
   }
}
 

The second parameter in ObjectGet() is one from https://docs.mql4.com/constants/objects/properties you have used 0 and 1. 0 is TIME1, 1 is PRICE1, it probably doesnt fullfill the conditions of your ifs

try doing:

double o1 = ObjectGet("Arrow0",0);
double o2 = ObjectGet("Arrow1",1);
Alert("Arrow0 Time= ",o1,");

Alert(" Arrow1 Price= ",o2);

Should make alert with the time of bar the first arrow is at, and alert with the price that the 2nd arrow is at.

 

Thanks

i will try it