system crashes with build update - page 2

 
Killuminati:

Hello well I do actually have the source code, and I do have a friend that is a programmer but he did not create the robot, do you think he will know how to fix it

Well now, that changes things doesn't it? If after a simple compile the EA still doesn't work, have your programmer contact me at pipaholic (att) shaw (dott) ca, and I'll let him/her know what I did to get mine working again on 13 charts simultaneously.


In a nutshell though, make the init section of the EA as light as possible ... no function calls, no file processing, no server hits ... just simple variable setups. Reading GlobalVariables seems without problems so far. The EA calls a function Setup(), where all the initialization stuff is now done, on the FirstPass through the Start section, and never calls it again. Not as elegant as before, and my clients are a bit annoyed that unless there is a new tick they can't tell if the EA is running, but I blame it on MT4 as we can only work with the parameters imposed on us.


Mark

 
flexie:

Well now, that changes things doesn't it? If after a simple compile the EA still doesn't work, have your programmer contact me at pipaholic (att) shaw (dott) ca, and I'll let him/her know what I did to get mine working again on 13 charts simultaneously.


In a nutshell though, make the init section of the EA as light as possible ... no function calls, no file processing, no server hits ... just simple variable setups. Reading GlobalVariables seems without problems so far. The EA calls a function Setup(), where all the initialization stuff is now done, on the FirstPass through the Start section, and never calls it again. Not as elegant as before, and my clients are a bit annoyed that unless there is a new tick they can't tell if the EA is running, but I blame it on MT4 as we can only work with the parameters imposed on us.


Mark


Thanks, but is this a rogue way of fixing it? I mean like is this the official and only way on the expert advisors end to fix this problem? or is it just avoiding bad code so the crash dont come up, I want the expert advisor to be fixed and in hormony with the mt4 build 221 for example if the expert advisor was built from scratch to work on this mt4 build 221 would the creator do it the way your describing? and that it wont cause any further problems down the road, thanks so much by the way

 
Killuminati:

Thanks, but is this a rogue way of fixing it? I mean like is this the official and only way on the expert advisors end to fix this problem? or is it just avoiding bad code so the crash dont come up, I want the expert advisor to be fixed and in hormony with the mt4 build 221 for example if the expert advisor was built from scratch to work on this mt4 build 221 would the creator do it the way your describing? and that it wont cause any further problems down the road, thanks so much by the way

Rogue? I would not say so. The setup functions must be done in one way or another. The way I was doing it before worked (and was not bad code by the way... LOL) in 220 but not 221. By packaging the setup functions and moving them the EA now works in 221. And yes, an author would do it this way as well... because the other way doesn't work. LOL.


As far as further problems down the road? You can count on it. As I mentioned earlier I have already been down this road before having runtime errors on a new build. If the MT4 programmers will change things without telling their users once, it will be done again. Buy your friendly programmer a pint and keep him happy... ;-)


Mark

 
flexie:

Rogue? I would not say so. The setup functions must be done in one way or another. The way I was doing it before worked (and was not bad code by the way... LOL) in 220 but not 221. By packaging the setup functions and moving them the EA now works in 221. And yes, an author would do it this way as well... because the other way doesn't work. LOL.


As far as further problems down the road? You can count on it. As I mentioned earlier I have already been down this road before having runtime errors on a new build. If the MT4 programmers will change things without telling their users once, it will be done again. Buy your friendly programmer a pint and keep him happy... ;-)


Mark

Thanks alot I appreciate it, I was thinking it would never work again, but I guess if you have the source code to everything you need, then your good, right?

 
Killuminati:

Thanks alot I appreciate it, I was thinking it would never work again, but I guess if you have the source code to everything you need, then your good, right?

Your welcome and good luck with the changes.


And as an aside, with 14 charts open, 5000 bars in the history, Quad-core, 2G Ram, indicators only showing 5 days back, CPU usage peaks over 60%... and crashes MT4 if I'm running Winamp... Guess no more nice music to trade by... ;-(

 

Yeah the first day I downloaded build 221 I crashed MT4 8 times in 1 hour. Using build 220 and prior, never crashed it once in the past year. Please undo the damage you did in 221.

Reason: