MQL4参考 检测 IsTradeContextBusy
Returns the information about trade context.
bool IsTradeContextBusy();
Returned value
Returns true if a thread for trading is occupied by another Expert Advisor, otherwise returns false.
Example:
if(IsTradeContextBusy()) Print("Trade context is busy. Please wait");