help with logic

 

Hello blz, I'm breaking my mind to get information from the object, but I don't want it to get the previous ones, but the ones that form in the current time, could you guide me?

for(int i =ObjectsTotal(0,0,OBJ_TEXT)-1;i>=0;i--){
 string name = ObjectName(0,i,0,OBJ_TEXT);
 if(StringFind(name,"Harami Cross")>-1){
 double price = ObjectGetDouble(0,name,OBJPROP_PRICE);
 color clr = (color)ObjectGetInteger(0,name,OBJPROP_COLOR);
}
 
  1. When you find the latest one, stop the loop.
    string name;
    for(int i =ObjectsTotal(0,0,OBJ_TEXT)-1;i>=0;i--){
     name = ObjectName(0,i,0,OBJ_TEXT);
     if(StringFind(name,"Harami Cross")>-1) break;
    }
     double price = ObjectGetDouble(0,name,OBJPROP_PRICE);
     color clr = (color)ObjectGetInteger(0,name,OBJPROP_COLOR);
    

  2. GCR_lipe fe: but the ones that form in the current time

    Objects do not form. They are created by code (or human). Do you have code running, creating them?

 
William Roeder #:
  1. When you find the latest one, stop the loop.

  2. Objects do not form. They are created by code (or human). Do you have code running, creating them?

sorry i worded it wrong, yes i have these

Reason: