Download MetaTrader 5

Stop a script

To add comments, please log in or register
BB2013
120
BB2013  

Hi,

I created my first scipt with a no end loop and now I cant stopped it.

How can I stop it ?

Thanks

jeex
87
jeex  
Close the program with Ctrl Alt Del.
Ubzen
5390
Ubzen  
Variopinto:

Hi,

I created my first scipt with a no end loop and now I cant stopped it.

How can I stop it ?

Thanks

Remove it Right_Click>Script>Remove. Communicate with it through GlobalVariableSet(). Like have it Get the x=GlobalVariableGet(Gv_userStop). if( x==1 ) return;...... Or you can use if( x==1 ) 0/0; //zero divide (not very safe but gets the job done). You can also search for stuff like remove a script with code. Running another script might also unload the script.
BB2013
120
BB2013  
ubzen:
Remove it Right_Click>Script>Remove. Communicate with it through GlobalVariableSet(). Like have it Get the x=GlobalVariableSet(userStop). if( x==1 ) return;...... Or you can use if( x==1 ) 0/0; //zero divide (not very safe but gets the job done). You can also search for stuff like remove a script with code. Running another script might also unload the script.

Thanks
Simon Gniadkowski
Moderator
18040
Simon Gniadkowski  
Variopinto:

Hi,

I created my first scipt with a no end loop and now I cant stopped it.

How can I stop it ?

Thanks

If you have to "Remove script" twice for the script to be removed it's because you haven't used IsStopped() as part of your loop condition.
To add comments, please log in or register