Label Objects defaulting to "Label"

 

Does anyone know what would cause Label Objects that have been set to " " for the purpose of remaining hidden untill they need to be used, to revert to their default text "Label" when I add another indicator to the chart, or know how to prevent this ?

My label creation code to create a grid pattern of label objects is

int init()
  {int i,j,k,w,x,y;
   w=0;
      
   for(int x=0; x<=5; x++)
    {for(int y=0; y<=30; y++)
      {ObjectCreate("signal"+w,OBJ_LABEL,0,0,0);
       ObjectSet("signal"+w,OBJPROP_XDISTANCE,x*50+5);
       ObjectSet("signal"+w,OBJPROP_YDISTANCE,y*15+110);
       ObjectSetText("signal"+w," ",11,font,fontcolor);
       w++;
      }
     ObjectSetText("signal"+x*31,S1[0,x],10,font,fontcolor);
    }
   return(0);
  }

The label objects then get filled with other strings in my scr() function that fills them as required with info about each trade,openprice, close price etc.

If I apply another indicator to the same chart as this one, some of the label objects revert to their default text and display the word "Label"

The strange thing is, this doesnt happen to any of the labels that have already been assigned different text by the scr() function, it also doesnt happen to the labels that have text defined in the last line in this init() function either. The line ObjectSetText("signal"+x*31,S1[0,x],10,font,fontcolor); which takes 5 strings from an array and assignes them to the labels in the top row of the label grid. These labels remain the same when I apply another indicator to the chart, the only ones that are affected, and revert to their default text are the ones that have not been changed since they were assigned the text " " in the original creation loop.

Reason: