Open EA Input-Settings, press OK, and the OnInit() executes TWICE - page 2

To add comments, please log in or register
ballenoz
80
ballenoz  
Looks like no-one thought this important enough to make the b625 cut <HUGE SIGH>
petermitchell
113
petermitchell  
ballenoz:
The secret to industrial-strength code is that it actually works <g>.


I have encountered this problem with the double init() and deinit(). It has really messed up some of my EAs. I class this as a serious problem. Can anyone advise on the best way to escalate this with MetaQuotes?
Keith Watford
Moderator
13903
Keith Watford  
ballenoz:
Looks like no-one thought this important enough to make the b625 cut <HUGE SIGH>


Yes, it is really annoying as I have some EAs that open trades in init

I really thought that it would be sorted in 625, but no!

Syed Naufal Gaddafi
1855
Syed Naufal Gaddafi  
Open EA Input-Settings, press OK, and the OnInit() executes TWICE

No such thing happened to me because I put a timer for my EA to let the terminal propagate and settles down properly on first and subsequent run.

Even when I change chart TF too.


Actually, what I see that the newer build terminal have this first initialization for mql5 codes, and then second initialization for mql4 codes propagation.

First initialization, prepares things, second initialization, fills data required.

My theory from observation though.


If EA runs even it is on first initialization, all numbers would be wrong, so, let my EA run after second initialization and all numbers are correct as expected. :)

Ian Venner
2396
Ian Venner  

My observations on build 625 are OnInit() executes all its code:

  • Once when you are loading the EA and click OK in any of the properties tabs.
  • Once if you recompile the EA while EA is loaded.
  • Once if you change the chart TF while EA is loaded.
  • Once if you bring up the EA's properties again after it is loaded and click OK on the "about" tab.
  • Once if you bring up the EA's properties again after it is loaded and click OK in the "common" tab.
  • TWICE if you bring up the EA's properties again after it is loaded and click OK in the "inputs" tab.
Alain Verleyen
36029
Alain Verleyen  

I received an answer of the Service Desk about this issue, that it should be fixed in build 628, available on Metaquotes-Demo server.

If someone can check that and confirm, it would be great. Thank you.

qjol
3195
qjol  
angevoyageur:


If someone can check that and confirm, it would be great. Thank you.


available to download from a zip file

Ian Venner
2396
Ian Venner  
The double OnInit() issue appears to be fixed in build 628
qjol
3195
qjol  
SDC:
The double OnInit() issue appears to be fixed in build 628

tnx 4 the info
Ian Venner
2396
Ian Venner  

You're welcome, its good to see MQ are ironing out these problems.

123
To add comments, please log in or register