You have not provided sufficient information to formulate an answer.
Show example code, with error checking, that can reproduce the issue as well as log output, and if possible, screenshots to demonstrate the issue.
this is working, means it deletes all objects that indicator generated when detach indicator from chart
//+------------------------------------------------------------------+ void OnDeinit(const int reason) { if (reason == 1 || reason ==4) { ObjectsDeleteAll(ChartID(), IndiName); GlobalVariableDel(IndiName + Symbol() + "LastCSVDate"); EventKillTimer(); } ChartRedraw(); }
this is not working, means when detaching indicator from chart it does not delete all objects created by indicator.
//+------------------------------------------------------------------+ void OnDeinit(const int reason) { if (reason == 1 || reason ==4) { ObjectsDeleteAll(ChartID(), IndiName, -1, -1); GlobalVariableDel(IndiName + Symbol() + "LastCSVDate"); EventKillTimer(); } ChartRedraw(); }
- Note1: I am sure all objects has IndiName (a string) as prefix.
- Note2: There is not any Error on journal section of indicator during detaching it. The only message: custom indicator ... removed.
this is working, means it deletes all objects that indicator generated when detach indicator from chart
this is not working, means when detaching indicator from chart it does not delete all objects created by indicator.
- Note1: I am sure all objects has IndiName (a string) as prefix.
- Note2: There is not any Error on journal section of indicator during detaching it. The only message: custom indicator ... removed.
Obviously if you don't do any error checking and report it to the Experts logs, there will not be any! You are not even checking the return value of the ObjectsDeleteAll() function.
Your code is also not reproducible. Provide sample code that is self contained and creates the objects and tries to delete them, so that it ca been run by users to verify your claim.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
why this is working for mt5 on mac↓
but this does not work↓
IndiName is a prefix for all objects in my indicator.