Initialization – The process when an EA or indicator starts. In MQL4 this is handled by init()
(or OnInit()
in recent builds); in MQL5 by OnInit()
. The initialization function runs once when the EA/indicator is attached (or recompiled) and sets up parameters. Its counterpart is deinitialization (deinit()
/OnDeinit()
).