[suggestion] Loading and Unloading of Indicators

 

Greetings, MT5 enthusiasts. First forum post, so please be gentle with me. 🙂

In https://www.mql5.com/en/docs/runtime/running, there's a list of situations when an indicator gets loaded or unloaded.

I suggest adding the case when a custom indicator is updated from the Market.

Here's the scenario: for some reason, the developer decided to change objects' names (e.g. an OBJ_LABEL was named "label_price" in CustomIndicatorV1.0, then it's named "custom_price" in  CustomIndicatorV1.1). V1.0 used to delete the object (by its name) in OnDeinit, but V1.1 only deletes the new object (by its new name). When updating the indicator from the Market, while there's a chart open, the residual old object would remain in it, alongside the new object, and never be deleted (because V1.1 only uses the new name in OnDeinit, as mentioned).

The issue could be addressed if the outdated indicator was unloaded before applying the update, which could/should be done automatically.

I appreciate if anyone has anything to add to this subject, as well as point me in the right direction if this is not the proper channel for sending suggestions to the dev team.

Documentation on MQL5: MQL5 programs / Program Running
Documentation on MQL5: MQL5 programs / Program Running
  • www.mql5.com
Program Running - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5