ObjectDelete

 
Hello everyone, my name is Sergio, I follow this forum for a few months, with your examples I managed to make a small indicator. I'm not a programmer but I hope to understand more and more with your help ..

I entered this function in my indicator.

if (WindowExpertName()!="Trend_Line_Alert"){Comment("Not the correct name");return 0;}

When I delete the indicator from Mt4, the words "Not the correct name" remain on the graph.
I tried to do a search I did not find anything.
Maybe I have to use the "ObjectDelete" function?
If this is the right function I did not understand how it works.
Can someone explain to me how to solve the problem?
Thank you all

Sergio


 
Comment is not an object so you can't delete it. Change the comment to ""
 
whroeder1:
Comment is not an object so you can't delete it. Change the comment to ""

Hello whroeder1, thanks for your reply.

He can explain what it means to replace the comment.

I do not understand.

Thank you

 
ponson:
I do not understand.

void OnDeinit(const int reason) 
  {
      Comment("");
  }
 
Anthony Garot:

Hi, Anthony Garot
Nice to meet you.
Thanks for the explanation, I understand.
Now it works great.

Thank you for your support.

Sergio