erwin-beckers / SupportResistance

Support Resistance Indicator for Metatrader 4
51 stars 30 forks source link

MT4 crash when accidentally double click a s/r line #3

Open Heart1010 opened 6 years ago

Heart1010 commented 6 years ago

When I accidentally double click a generated s/r line from your indicator then I see the properties window from this object. When this happen my mt4 totally crash ("Keine Rückmeldung"), I have to close the mt4 task manually.

rosasurfer commented 5 years ago

Cause: A double-clicked chart object becomes "selected". If MQL tries to access a selected object it fails with ERR_OBJECT_DOES_NOT_EXIST. Incorrectly handling this error (e.g. by taking it literally, assuming it doesn't exist and trying to re-create it) leads to that crash. I recommend to make sure the object is created once and to ignore that specific error afterwards. That's what I do and I know of no other way to handle the situation.