MQL4参考 预定义变量 _StopFlag

bool _StopFlag

The _StopFlag variable contains the flag of the mql4-program stop. When the client terminal is trying to stop the program, it sets the _StopFlag variable to true.

To check the state of the _StopFlag you may also use the IsStopped() function.