mt4ski: If I do the following, only about half the matching lines get deleted.
- Of course, it does.
- Simple fix, but since you were argumentative and arrogant last February, you were put on my do not help list.
William Roeder:
- 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.
mt4ski:
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)) ; } }
mt4ski:
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--)
mt4ski: Get over yourself.
Argumentative and arrogant again (4x) but Keith gave it to you.
Keith Watford:
Of course. Thanks.Always count down in the loops.
William Roeder:
Argumentative and arrogant again (4x) but Keith gave it to you.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.