EV Problem

 
MQL4 EV Problem
A strange new error has appeared in my EV’s. When I load any EV I get the following sequence of messages:
loaded successfully; deinitialized; uninit reason 1 (or reason 5); removed.
I urgently need to solve this problem so I will be grateful for any help
 

Uninitialize reason codes returned by UninitializeReason() function. It can be any one of the following values:


Constant

Value

Description



0

Script finished its execution independently.

REASON_REMOVE

1

Expert removed from chart.

REASON_RECOMPILE

2

Expert recompiled.

REASON_CHARTCHANGE

3

symbol or timeframe changed on the chart.

REASON_CHARTCLOSE

4

Chart closed.

REASON_PARAMETERS

5

Inputs parameters was changed by user.

REASON_ACCOUNT

6

Other account activated.


..and here the function that returns them

int UninitializeReason(

)


Returns the code of the uninitialization reason for the experts, custom indicators, and scripts. The returned values can be ones of Uninitialize reason codes. This function can also be called in function init() to analyze the reasons for deinitialization of the previour launch.

Sample:

// this is example

int deinit()

{

switch(UninitializeReason())

{

case REASON_CHARTCLOSE:

case REASON_REMOVE: CleanUp(); break; // cleaning up and deallocation of all resources.

case REASON_RECOMPILE:

case REASON_CHARTCHANGE:

case REASON_PARAMETERS:

case REASON_ACCOUNT: StoreData(); break; // prepare to restart

}

//...

}


 
Thanks for your help