Script removing EA?

 

Hello,

is it possible to write an MQL5 script that removes the currently active EA? ExpertRemove() seems to only work when used in the EA itself, not in a script?

Many thanks!

 
bromelio:

Hello,

is it possible to write an MQL5 script that removes the currently active EA? ExpertRemove() seems to only work when used in the EA itself, not in a script?

Many thanks!

Write another EA with only this function if does not work with the script. 
 
Marius Ovidiu Sunzuiana:
Write another EA with only this function if does not work with the script. 

Ok, that worked, thanks for this super-fast answer! However, the idea was to run the script simply via hotkey and the EA would be gone. I can start the ExpertRemove() EA via hotkey, too, sure, but this way I now get two pop-up windows (1. confirm that I really want to replace the current EA by another one and 2. confirm that I want to allow signals and automatic trading). Is there a way to get rid of those pop-up windows, at least the second one?


Many thanks in advance!