I add text to my chart and then switch timeframes, come back and the text is gone. How can i make it stay?

 
Hi, i have an issue. I add text to my chart and then switch timeframes, come back and the text is gone. How can i make it stay?
 
Have you confirmed by looking in the list of objects (Ctrl-B) that it is gone?
 
  1. A badly coded indicator/EA deleted all objects on deinit
  2. Or you added text (which move with the bars) instead of a label
 
whroeder1:
  1. A badly coded indicator/EA deleted all objects on deinit
  2. Or you added text (which move with the bars) instead of a label
Yeah, Text. I need it to stay in place so i can keep track of what happened in the past.  Is there a way to make it stay?
 
Did you have some code maybe it gets deleted upon timeframe switch ?
 
Marco vd Heijden:
Did you have some code maybe it gets deleted upon timeframe switch ?
Yeah, when i look into the objects list, the text is no longer there.
 
jakubdonovan36: Yeah, when i look into the objects list, the text is no longer there.
What part of "A badly coded indicator/EA deleted all objects on deinit" was unclear? Fix your broken indicator.
 
whroeder1:
What part of "A badly coded indicator/EA deleted all objects on deinit" was unclear? Fix your broken indicator.

I figured out which indicator it is. It's called "daysofweeklabels"   but I can't code. How would i fix this? what is "deinit"

 

On lines 168 and 184 you have


    Obj_Name=Time[pos];

You should add a prefix

eg. change them  to


    Obj_Name="DWlabels"+Time[pos];

Then lines 88 and 89 (in deinit)


ObjectsDeleteAll(0,OBJ_VLINE);
ObjectsDeleteAll(0, OBJ_TEXT);

should be replaced with the single line


ObjectsDeleteAll(0,"DWlabels",EMPTY,EMPTY);
Reason: