MT5 CTrade deactivate LOG_LEVEL_ALL

 

Hi,

I want deactivate the LOG_LEVEL_ALL in the CTrade Class for backtesting.

Is that possible?

Thanks for your Help!

Matthias

 
CTrade go_Trade;
go_Trade.LogLevel(LOG_LEVEL_ERRORS);
 

Hello,

thanks for your help.

Your solution work very well but who can I disable all other messages in the backtesting  mode?


Because in trade.mqh in line 164 is following defined:

//+------------------------------------------------------------------+
//| Constructor                                                      |
//+------------------------------------------------------------------+
CTrade::CTrade(void) : m_async_mode(false),
                       m_magic(0),
                       m_deviation(10),
                       m_type_filling(ORDER_FILLING_FOK),
                       m_log_level(LOG_LEVEL_ERRORS)

  {
   SetMarginMode();
//--- initialize protected data
   ClearStructures();
//--- check programm mode
   if(MQL5InfoInteger(MQL5_TESTING))
      m_log_level=LOG_LEVEL_ALL;
   if(MQL5InfoInteger(MQL5_OPTIMIZATION))
      m_log_level=LOG_LEVEL_NO;
  }
//+--------


Thanks for your help!


Matthias