How to stop a script?

 
Is there a way to stop a script that is frozen or stuck in a loop, etc?
 
A script is fulfilled just once. May be you meant an advisor?
 
Say a script is stuck in a loop or I simply want to kill the processing because I dont want to wait for it to finish running.
 
Use function break.
 
Yes, but is there a keystroke to exit if needed?
 
fxtraydor:
Say a script is stuck in a loop or I simply want to kill the processing because I dont want to wait for it to finish running.
Right click on the chart, click Remove script . . .
 
ExpertRemove() >> The function stops an Expert Advisor and unloads it from a chart.

The break operator terminates the execution of the nearest nested outward switch, while, do-while or for operator. The control is passed to the operator that follows the terminated one. One of the purposes of this operator is to finish the looping execution when a certain value is assigned to a variable
 
Alexander: A script is fulfilled just once. May be you meant an advisor?

Off topic. OP already said "a frozen script" Read the original question

Alexander: Use function break.

Off topic. There is no break function in the running code. Read the original question and #2.

Off topic. There is no break function in the running code. Read the original question and #2 and #4. Stop repeating your previous incorrect post.

DyegoSantos: ExpertRemove() >> The function stops an Expert Advisor and unloads it from a chart.

Off topic. There is no ExpertRemove function in the running code. Read the original question and #2 and #4.


What part of "right click on the chart, click Remove script …" was unclear to you people?