IsStopped(__FUNCTION__) error why?
IsStopped(__FUNCTION__) Normal after comment.
That IsStopped is a call to another overloaded function within the class CTrade, not the one you think.
//+------------------------------------------------------------------+ //| Checks forced shutdown of MQL5-program | //+------------------------------------------------------------------+ bool CTrade::IsStopped(const string function) { if(!::IsStopped()) return(false); //--- MQL5 program is stopped PrintFormat("%s: MQL5 program is stopped. Trading is disabled", function); m_result.retcode = TRADE_RETCODE_CLIENT_DISABLES_AT; return(true); }