I have an indicator which draws and deltes trendlines.
When I physically grab the line with the mouse and tick hapens at the same time MT Terminal goes into freezing loop.
It seems there is conflict between grabbing line with mouse and trying to delete the same line in the indicator code.
Terminal freezes.
Wnated to report for developement team to look into.
Nothing like that has happened to me. Have you tried re installing the MT4 software to see if that will resolve your issue?
I have an indicator which draws and deltes trendlines.
When I physically grab the line with the mouse and tick hapens at the same time MT Terminal goes into freezing loop.
It seems there is conflict between grabbing line with mouse and trying to delete the same line in the indicator code.
Terminal freezes.
Wnated to report for developement team to look into.
I think I found the problem.
When someone grabs trendline and expert tries to delete it at the same time line is nor deleted but ObjectDelete returns true and no error occurs.
I was deleting objects in a loop based oh objetc generic name and when object was not deleted I got into infinite loop.
So now I check if object still exists and proceed to delete the next object
int ObjectDeleteAll(string prefix) { int i,deletecount,check; while(i<ObjectsTotal()) { string objname=ObjectName(i); if(StringFind(objname,prefix,0)==0) { if(ObjectDelete(objname)) { if(ObjectFind(objname)<0) { deletecount++; } else { i++; } } else { i++; } } else i++; } return(deletecount); }
useful function to delete objects based on first chars of the name.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have an indicator which draws and deltes trendlines.
When I physically grab the line with the mouse and tick hapens at the same time MT Terminal goes into freezing loop.
It seems there is conflict between grabbing line with mouse and trying to delete the same line in the indicator code.
Terminal freezes.
Wnated to report for developement team to look into.