Indicator to remove itself

Back to topics list To post a new topic, please log in or register
avatar
23
Papler 2010.10.11 23:10
 

I was wondering if it's possible for an indicator to remove itself.

Currently I use an indicator to create a label on the chart and update it every tick. But if you want to remove it, you have to first remove the indicator, and also remove the label. I know that in the deinit() function I can put code that will delete the label, but, would it be possible that if the indicator detects that the label no longer exists (user has deleted it), it deinitializes itself?


Thank you.

 
avatar
3134
qjol 2010.10.12 01:02 #
 

as far as i know Computers can not do anything without telling them how to do & Can do anything if you tell them how to do

avatar
3
dennymz 2015.06.06 16:02 #
 
Papler:

I was wondering if it's possible for an indicator to remove itself.

Currently I use an indicator to create a label on the chart and update it every tick. But if you want to remove it, you have to first remove the indicator, and also remove the label. I know that in the deinit() function I can put code that will delete the label, but, would it be possible that if the indicator detects that the label no longer exists (user has deleted it), it deinitializes itself?


Thank you.


 Have a look at 

https://docs.mql4.com/objects/ObjectFind

and

https://docs.mql4.com/chart_operations/chartindicatordelete

Back to topics list  

To add comments, please log in or register