Error with no description

[Deleted]  

Hi There !

Can someone please help me getting more information about this message ?

JG 0 22:10:32.215 YouBotG2 (WINQ14,M1) OnDeinit_Uninitalization reason code = 9

DH 0 22:10:32.215 YouBotG2 (WINQ14,M1) OnDeinit_UninitReason = Another reason

DQ 0 22:10:32.215 YouBotG2 (WDON14,M15) OnDeinit_Uninitalization reason code = 9

HF 0 22:10:32.215 YouBotG2 (WDON14,M15) OnDeinit_UninitReason = Another reason 

Regards,

MRC 

Alain Verleyen  
YouTrade:

Hi There !

Can someone please help me getting more information about this message ?

JG 0 22:10:32.215 YouBotG2 (WINQ14,M1) OnDeinit_Uninitalization reason code = 9

DH 0 22:10:32.215 YouBotG2 (WINQ14,M1) OnDeinit_UninitReason = Another reason

DQ 0 22:10:32.215 YouBotG2 (WDON14,M15) OnDeinit_Uninitalization reason code = 9

HF 0 22:10:32.215 YouBotG2 (WDON14,M15) OnDeinit_UninitReason = Another reason 

Regards,

MRC 

These message are printed by your code, not ?
[Deleted]  
angevoyageur:
These message are printed by your code, not ?

Yes ... printed by my code ... what can I do please ?

 

void OnDeinit(const int reason)
  {
//--- The first way to get the uninitialization reason code
   Print(__FUNCTION__,"_Uninitalization reason code = ",reason);
//--- The second way to get the uninitialization reason code
   Print(__FUNCTION__,"_UninitReason = ",getUninitReasonText(_UninitReason));

  }

string getUninitReasonText(int reasonCode)
  {
   string text="";
   switch(reasonCode)
     {
      case REASON_ACCOUNT:
         text="Account was changed";break;
      case REASON_CHARTCHANGE:
         text="Symbol or timeframe was changed";break;
      case REASON_CHARTCLOSE:
         text="Chart was closed";break;
      case REASON_PARAMETERS:
         text="Input-parameter was changed";break;
      case REASON_RECOMPILE:
         text="Program "+__FILE__+" was recompiled";break;
      case REASON_REMOVE:
         text="Program "+__FILE__+" was removed from chart";break;
      case REASON_TEMPLATE:
         text="New template was applied to chart";break;
      default:text="Another reason";
     }
   return text;
  }
[Deleted]  
verdure:

The link below will provide useful information

https://docs.mql4.com/constants/namedconstants/uninit 

You may need to further develop the getUninitReasonText function if you want it to print the description of all the reason codes.

Cheers. 

Thank you ... see above... I am already using it !

Any ideas ?

Alain Verleyen  
YouTrade:

Hi There !

Can someone please help me getting more information about this message ?

JG 0 22:10:32.215 YouBotG2 (WINQ14,M1) OnDeinit_Uninitalization reason code = 9

DH 0 22:10:32.215 YouBotG2 (WINQ14,M1) OnDeinit_UninitReason = Another reason

DQ 0 22:10:32.215 YouBotG2 (WDON14,M15) OnDeinit_Uninitalization reason code = 9

HF 0 22:10:32.215 YouBotG2 (WDON14,M15) OnDeinit_UninitReason = Another reason 

Regards,

MRC 


REASON_CLOSE

9

Terminal has been closed

[Deleted]  
angevoyageur:

REASON_CLOSE

9

Terminal has been closed

Thank you very much. Now I need to understand why ?

Thank you 

William Roeder  
Marcelo Coutinho: Thank you very much. Now I need to understand why ?

You closed the terminal, i.e. File → Exit, Close button, called TerminalClose, or Windows shutdown.

Reason: