Return values of init(), start() and deinit()

 
Hi there,

1. When one is writing their own init(), start() or deinit() function for an expert, script or indicator is there any significance in the return() value one uses? Does it really matter if one uses return(0) or say return (-1) in the context of how the MT4 terminal treats the return code of these user defined functions.

2. Is there any function or programatic means by which one can cause an expert or indicator to unload itself? If an expert or script is running and an event occurs and you want to delete the indicator or script automatically as a result of that event how would one do that?

Regards,

Laurence.
 
1. No, result of special functions init(), start() and deinit() are used nowhere.
2. It's impossible, you can unload expert or indicator manually only.
Reason: