[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 708

 

Any discussion of brokers is forbidden. Formulate questions in such a way that they do not involve specific VCs. For example: "what are the rules for choosing a broker" and then go and try it on whether or not it suits you.

 

Can you tell me if it is possible to screw a background "backing" under the indicator?

I couldn't find it on the search...

And one more thing. How do I correctly delete all objects created by the indicator? Just list them?

 
If the chart only contains objects created by this indicator, ObjectsDeleteAll() is sufficient, and if not all objects need to be deleted, ObjectDelete() in the loop.
 
   for(int sd=100;sd>0;sd--)
   ObjectDelete("signal"+sd);
 for(int sd=0;sd<100;sd++)
 ObjectDelete("signal"+sd);
for(int sd=-1;sd<100;sd++)
ObjectDelete("signal"+sd);

All these leave "signal00", "signal01", "signal02" etc., everything above "signal10" is killed... Where am I stupid?

 

Why not just delete all objects with the mask "signal"? Or are there any objects with similar names from other indictors?

In general, Print() is useful in such cases to see what you are trying to delete.

 
Mathemat:

Why not just delete all objects with the mask "signal" (without a space)?

In general, Print() is useful in such cases to see what you're trying to delete.

Because I haven't thought of that yet :)

Objects are created "textbook".

   for(int x=0;x<9;x++)
      for(int y=0;y<3;y++)
      {
         ObjectCreate("signal"+x+y,OBJ_LABEL,0,0,0,0,0);
         ObjectSet("signal"+x+y,OBJPROP_XDISTANCE,x*40+12);
         ObjectSet("signal"+x+y,OBJPROP_YDISTANCE,y*20+20);
         ObjectSetText("signal"+x+y,CharToStr(254),20,"Wingdings",Gold);

      }

Then only the content is changed by ticks.

I'm going to try the print now, it's still not clear... Isn't mt 01 a number?

 
Abzasc:

All these leave "signal00", "signal01", "signal02" etc., everything above "signal10" is killed... Where am I stupid?



maybe the advice would be "out of the box", you have to strive for uniqueness... Once again, "out of the box"... For example, I myself achieve uniqueness through "date" + TF + "prefix". maybe this is "too heavy" in a particular case, but when "expanding" it helps a lot.
 
Yes, I'm surprised to see that the name mask can't be entered directly. This is inconvenient.
 
Abzasc:

One more thing. How do I correctly delete all the objects created by the indicator? Just list them?

void clear_object(string s) {
        for(int i=ObjectsTotal()-1; i>=0;i--) {
                string vName = ObjectName(i);
     if (StringFind(vName,s) !=-1) ObjectDelete(vName);
  }
}

deletes all objects containing string s - my EA draws arrows named "Arrow" + time - delete all arrows clear_object("Arrow");
 
DDFedor:

Maybe the advice would be "out of the box", we should strive for uniqueness... Once again, "off-topic"... I myself, for example, achieve uniqueness through "date" + TF + "prefix". maybe this is "too heavy" option in a particular case, but when "expanding" it helps a lot.


Yes, that's probably what's going to happen. Here's an idea. The indicator creates a table, and in my case signal is already a unique group.

Reason: