Quote:
|
Originally Posted by BC Brett
I'm not sure what to conclude from this but it looks like the init() function needs to complete once before account information functons will return the correct values.
|
OK, I just ran another test to see if init() really did need to complete before the account functions would work or if it was just MT4 needed more time to finish its startup launch.
I added the statement sleep(1000) as the first line in the init() function, recompiled, shutdown MT4, and then restarted it. Now the account function calls in the init() funtion are returning the correct values.
Conclusion: MT4 starts running the EA before it finishes retrieving account information on startup. The sleep(1000) function gives it more time to complete downloading account information. But if anyone can answer my original question ...
Quote:
|
Originally Posted by BC Brett
can any code somehow be executed after the init() function and before the start() function?
|