10 lines
559 B
Markdown
10 lines
559 B
Markdown
# OnInit
|
|
|
|
The Init event is generated immediately after an Expert Advisor or an indicator is downloaded; The OnInit() function is used for initialization. If OnInit() has the int type of the return value, the non-zero return code means unsuccessful initialization, and it generates the Deinit event with the code of deinitialization reason REASON_INITFAILED.
|
|
|
|
OnInit() function execution result is analyzed by the terminal's runtime subsystem only if the program has been compiled using #property strict.
|
|
|
|
INIT_SUCCEEDED
|
|
INIT_FAILED
|
|
INIT_PARAMETERS_INCORRECT
|