MQL4参考 检测 IsExpertEnabled
Checks if Expert Advisors are enabled for running.
bool IsExpertEnabled();
Returned value
Returns true if Expert Advisors are enabled for running, otherwise returns false.
Example:
while(!IsStopped()) { ... if(!IsExpertEnabled()) break; }