UninitializeReason(): Meaning of REASON_PARAMETERS and REASON_ACCOUNT

 

B"H


Hello,

What is the meaning of these two values returned by the "UninitializeReason" method?

The formal documentation lacks information regarding the situation(s) in which either of these values shall be returned:

REASON_PARAMETERS 5 Inputs parameters was changed by user.
REASON_ACCOUNT 6 Other account activated.


How can input parameters be changed during runtime?


Would appreciate a decent explanation of both values.


Thanks in advance,

Simha

 
Simha:

What is the meaning of these two values returned by the "UninitializeReason" method?

The formal documentation lacks information regarding the situation(s) in which either of these values shall be returned:

REASON_PARAMETERS 5 Inputs parameters was changed by user.
REASON_ACCOUNT 6 Other account activated.
  1. Pressing F7 will bring up the Parameters window of the currently attached EA (for the selected chart). This can also be done by right-clicking and selecting Expert Advisers > Properties. Changing the properties during run will cause deinit() and init() to be called before the next start(); in that case UninitializeReason() will return REASON_PARAMETERS if called.
  2. Changing an account during run (via Menu > File > Login) will cause deinit() and init() to be called; in that case UninitializeReason() will return REASON_ACCOUNT if called.
 
gordon:
  1. Pressing F7 will bring up the Parameters window of the currently attached EA (for the selected chart). This can also be done by right-clicking and selecting Expert Advisers > Properties. Changing the properties during run will cause deinit() and init() to be called before the next start(); in that case UninitializeReason() will return REASON_PARAMETERS if called.
  2. Changing an account during run (via Menu > File > Login) will cause deinit() and init() to be called; in that case UninitializeReason() will return REASON_ACCOUNT if called.
My response to your message is very simple: Thanks. :-)
Reason: