History Base: Not Enough Memory

 

I've imported three currency histories to MT4 that date from 2001.01.01 to present. Since then, my computer has slowed down and my demo account has been prone to problems the most recent of which being "history base not enough memory" messages. Is there a quick fix to this problem? For instance, since this all began with the importing of the three histories to MT4 and I really only need to test one history at a time, could either removing two of the histories from MT4 or deleting them from my computer aleviate these problems?

 
limit bars in chart, bars in history
 
WHRoeder:
limit bars in chart, bars in history


Thank you for your reply but so far I don't know what it means.

How are the bars to be limited in chart and history and what does it achieve?

And does your suggestion imply that removing two of the histories wouldn't be a solution?

 
ctrl-o (options), bars in history and bars in chart. put bars in chart to somthing nicely managle like 250000.
 
Histories are on disk, nothing to do with a ram problem. If the EA generates lots of objects, reducing even more (like 5k) may be necessary.
 

Untrue, had this problem on my laptop with 2GB ram. Loaded EURUSD 1m data from 1.1.2001 and suddenly the whole thing went to shambles, response time in seconds, 50-60% cpu utilization, 50% being metatrader. Didn't know what was going on (I had no EAs or indicators, only 1 chart with the chart data) until I set the bars in chart to something low and nice as I stated above. BArs in history is wrttien on disk and doesnt do anything here, but bars in chart does.

Computer turned to normal then. (was using core2 duo hp workstation with 2gb of ram on windows 7. I never had this problem on my desktop computer.

EDIT: umm i think you may have been answering a different question when you said that they don't have anything to do with ram problem (the one whether removing histories would improve the performace). To clarify that one, it would, but indirectly as your charts would not be filled with that much data. You can keep your histories and just set the bars in chart to a lower value.

 
forexCoder:

Untrue, had this problem on my laptop with 2GB ram. Loaded EURUSD 1m data from 1.1.2001 and suddenly the whole thing went to shambles, response time in seconds, 50-60% cpu utilization, 50% being metatrader. Didn't know what was going on (I had no EAs or indicators, only 1 chart with the chart data) until I set the bars in chart to something low and nice as I stated above. BArs in history is wrttien on disk and doesnt do anything here, but bars in chart does.

Computer turned to normal then. (was using core2 duo hp workstation with 2gb of ram on windows 7. I never had this problem on my desktop computer.

EDIT: umm i think you may have been answering a different question when you said that they don't have anything to do with ram problem (the one whether removing histories would improve the performace). To clarify that one, it would, but indirectly as your charts would not be filled with that much data. You can keep your histories and just set the bars in chart to a lower value.


My thanks to both of you for all of your helpfull replies. I'll pursue the suggestion to reduce the bars in chart and see how that fairs.
 
forexCoder:

Untrue, had this problem on my laptop with 2GB ram. Loaded EURUSD 1m data from 1.1.2001 and suddenly the whole thing went to shambles, response time in seconds, 50-60% cpu utilization, 50% being metatrader. Didn't know what was going on (I had no EAs or indicators, only 1 chart with the chart data) until I set the bars in chart to something low and nice as I stated above. BArs in history is wrttien on disk and doesnt do anything here, but bars in chart does.

Computer turned to normal then. (was using core2 duo hp workstation with 2gb of ram on windows 7. I never had this problem on my desktop computer.

EDIT: umm i think you may have been answering a different question when you said that they don't have anything to do with ram problem (the one whether removing histories would improve the performace). To clarify that one, it would, but indirectly as your charts would not be filled with that much data. You can keep your histories and just set the bars in chart to a lower value.


Okay, now that I've reduced the history and chart bars to 250000, I can backtest but I can't optimize for more than a few minutes before CPU reaches 100% and MT4 stalls which is curious since under the previous +250000 bar conditions, I had been able to optimize an EA for nearly a week with no problems. Any suggestions on how I overcome this?
 

Back testing, same as live trading (or forward testing, both mean "compute-by-real-time-tick-data") shouldn't have adverse (or even more importantly gradually worse) effects on computer's performace. If it does, this most likely means that you have some data arrays that just keep filling up. At least my experience taught me that.

You might want to check how your code behaves.

 
forexCoder:

Back testing, same as live trading (or forward testing, both mean "compute-by-real-time-tick-data") shouldn't have adverse (or even more importantly gradually worse) effects on computer's performace. If it does, this most likely means that you have some data arrays that just keep filling up. At least my experience taught me that.

You might want to check how your code behaves.


It's not the backtesting that I'm currently having the problem with, that seems to be okay. The problem is currently occuring with optimization.
 
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.
Reason: