History Base: Not Enough Memory - page 2

 
forexCoder:
It's normal then that the process takes time and cpu and ram, however the computer's performace should be smooth if you have at least a cpu that can run 2 threads so dual core or core 2 duo. I have optimized on my laptop (core2duo, 2g ram) a strategy for 2 days, and the laptop was under 60% performace and some heavy ram usage, but the system and MT were responsive through the whole thing.

I've been doing a little experimenting to see if I can come across some combination of settings that work. So far, nothing has. However, I have observed in task manager that when optimizing, the memory used by MT4 begins to increase from around 155,000 k on up to around 1,976,000 k during which time CPU averages around 55%. Once the memory usage ceases to increase, CPU jumps up to 90% and soon reaches 100% at which point MT4 ceases to respond.
 

Em.

Seriously. Check your arrays in code whether you're properly dupming data you don't need each cycle or each period. MT4 has no bloody business taking 2GB of ram for an optimization. I have never gone over 700MB and that was with many charts open with loads of indicators (they used 600mb combined) AND optimization running.

 
forexCoder:

Em.

Seriously. Check your arrays in code whether you're properly dupming data you don't need each cycle or each period. MT4 has no bloody business taking 2GB of ram for an optimization. I have never gone over 700MB and that was with many charts open with loads of indicators (they used 600mb combined) AND optimization running.


Okay, being a novice at this, I have no idea how to do that. I didn't even know about task manager until a couple of weeks ago. What steps should I take in checking the arrays in code?
 

Do you have in your start() function (or any child function) that always adds data to the end of any of your arrays (or more of them)?

Something like ArrayResize(array_name, new_size)?

If your code does it, you run out of ram and then cpu fast.

 
forexCoder:

Do you have in your start() function (or any child function) that always adds data to the end of any of your arrays (or more of them)?

Something like ArrayResize(array_name, new_size)?

If your code does it, you run out of ram and then cpu fast.


Okay, from your reply, I'm currently assuming you're referring to the code of the EA rather than something pertaining to MT4 or to the computer itself (?) Currently, I have no solid idea as to what the reference to the start() function pertains to. My EA was built by an EA builder so I'm not currently familiar with the details of its code. As this is all new to me and a big learning experience for me, my current ignorance in some of these matters can change.

There has been a change however. Last night, I removed two of the EAs from MT4 that I had been attempting to optimize and replaced them with a simpler one. For optimization, I put the history and chart bars up to 1000000 and tested from 2001.01.01 - 2011.05.31. During optimization, the memory usage peaked in the 500,000 k range and CPU averaged around 60%. Optimization lasted from 2011.05.31 21.56.18 - 2011.06.01 03.36.05 but in the end there were no results. 953 cache records were used, 953 cache records were rejected. There were 135 passes done during optimization, 135 results have been discarded as insignificant. What all of that means or what I need to do about it, I don't currently know.

 
Strategy tester -> Optimization results -> right click -> uncheck skip useless results.
 
Does that EA builder give you an .mq4 file when you're ifnished with it or just .ex4 file (when you get the download - I don't know how the builder works)?
 
forexCoder:
Does that EA builder give you an .mq4 file when you're ifnished with it or just .ex4 file (when you get the download - I don't know how the builder works)?

Yes, it's composed of both an .mq4 file and the .ex4 file.
 
The mq4 is the code, LOOK in the code for the START(). There's no mind readers here. Don't expect us to give you answers without you giving us information.
 
Open the mql4 file as WHRoeder suggested, check the insides of start() function like I told you.
Reason: