How to re-attach a script/EA from mql?

 

if some operations in scripts fail, the whole script will fail and halt. But when I remove and attach the script, it works.

So just wanted to know if there is any way to re-attach the script from mql like handling an exception. Something like:


result = do some operation;

if(result == Fail){

restart current script();

}

 
kiran1808: if some operations in scripts fail, the whole script will fail and halt. But when I remove and attach the script, it works. So just wanted to know if there is any way to re-attach the script from mql like handling an exception. Something like:

That is the wrong way to resolve the issue. The correct way is to fix the coding bugs in the script so that it does not fail during runtime.

Reason: