MQL4 process question

 

If you declared AND initialize some Global and Local Variables, are these variables re-initialized after every cycle reaches return(0) or does it go back to Start() and skips the re-initialization of the variables?

My own opinion is that it does not re-initialize the variables on every cycle - but is that correct?

 
Yes. Initialization is like a starting point. After that, start() will take over. However, if you want to re-initialized, it is possible though. With some codings of course.
 
ernest02:

If you declared AND initialize some Global and Local Variables, are these variables re-initialized after every cycle reaches return(0) or does it go back to Start() and skips the re-initialization of the variables?

My own opinion is that it does not re-initialize the variables on every cycle - but is that correct?


.. it depends.

Please provide a code example for a serious answer.

 

Initialization of global and static variables is performed once. Initialization of local variables is made every time their function is called.