How to unload the indicator by program

 
I want to know if it is possible to unload the indicator from the chart by the indicator itself.

Actually, I want to avoid the user to load the same indicator more than one into the same chart.

Thanks.
 
No, it's impossible. But you can detect the name of indicator (or expert) which will be run at this time by function WindowExpertName( ) and look for the window with attached this indicator. See WindowFind()
原因: