GiovanniImperiale:
Hello,
I have problem when I want to delete all objects from chart with names begining at "AT_".
Only several of them are deleted, always the same are leving on the chart. I cheked names, all are correct and all objects are finded but not deleted.
Any idea?
ObjectDelete("AT_"); or ObjectsDeleteAll();
This might work.....
GiovanniImperiale: Only several of them are deleted,
- Kenneth has already given you the simple method.
- The reason your code doesn't work is that you are counting up.
you can simply count down, in a position loop, and you won't miss orders. Get in the habit of always counting down.
Loops and Closing or Deleting Orders - MQL4 programming forum
Hello,
Yes,
ObjectsDeleteAll();
can be use but I want to avoid deleting objects which are the part of second panel on chart. That's why I used:
if(StringFind(name,"AP_")>=0)
But with Roedger advaise it works.
Thank you!
GiovanniImperiale:
Hello,
Yes,
ObjectsDeleteAll();
can be use but I want to avoid deleting objects which are the part of second panel on chart. That's why I used:
But with Roedger advaise it works.
Thank you!
ObjectsDeleteAll(0,"AT_);
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
Hello,
I have problem when I want to delete all objects from chart with names begining at "AT_".
Only several of them are deleted, always the same are leving on the chart. I cheked names, all are correct and all objects are finded but not deleted.
Any idea?