How to delete all objects created by a custom indicator?
- Of course, it does.
- Simple fix, but since you were argumentative and arrogant last February, you were put on my do not help list.
- Of course, it does.
- Simple fix, but since you were argumentative and arrogant last February, you were put on my do not help list.
Not everything is the programmer's fault. Sometimes bugs, glitches and hacking happens. Long is passed the time when you should have let go of your grudge. Get over yourself.
Alternatively, how do I delete all OBJ_VLINES with a certain string in their name?
If I do the following, only about half the matching lines get deleted.
void OnStart() { //--- int obj_total=ObjectsTotal(); for(int i=0; i<obj_total; i++) { if((ObjectType(ObjectName(i))==OBJ_VLINE)) ObjectDelete(ObjectName(i)) ; } }
Alternatively, how do I delete all OBJ_VLINES with a certain string in their name?
If I do the following, only about half the matching lines get deleted.
int obj_total=ObjectsTotal(); int result; string name; for(int i=0;i<obj_total;i++) { name = ObjectName(i); result = StringFind(name,substring); if(result > -1) { ObjectDelete(name); } }
Mehmet Bastem:
void OnStart() { //--- int obj_total=ObjectsTotal(); for(int i=0; i<obj_total; i++) { if((ObjectType(ObjectName(i))==OBJ_VLINE)) ObjectDelete(ObjectName(i)) ; } }
Always count down in the loops.
for(int i=ObjectsTotal()-1;i>=0;i--)
Argumentative and arrogant again (4x) but Keith gave it to you.
Always count down in the loops.
Argumentative and arrogant again (4x) but Keith gave it to you.
Alternatively, how do I delete all OBJ_VLINES with a certain string in their name?
If I do the following, only about half the matching lines get deleted.