memory usage of terminal.exe while running tests

 

Guys, when Im running backtests for just a 4 month period, my memory usage of terminal.exe ticks up soooo fast that most of the time metatrader crashes when it reaches 950,000K of memory usage! I can watch it and see it goes up about 100K every second....


1) What could be causing this if its my code? What should I look for inside my code?


2) Is this considered "normal" ?


3) Any work arounds?



Thanks!



ps. I should probably add that the machine its running on is a quad-core 3.0ghz with 3.0G's of ram ... and the EA/Indicators during test will challenge about 6,000 lines of code.

 
trader346 wrote >>

Guys, when Im running backtests for just a 4 month period, my memory usage of terminal.exe ticks up soooo fast that most of the time metatrader crashes when it reaches 950,000K of memory usage! I can watch it and see it goes up about 100K every second....

1) What could be causing this if its my code? What should I look for inside my code?

2) Is this considered "normal" ?

3) Any work arounds?

Thanks!

ps. I should probably add that the machine its running on is a quad-core 3.0ghz with 3.0G's of ram ... and the EA/Indicators during test will challenge about 6,000 lines of code.

Just a thought I had. Are you running your test in visual mode? If so, uncheck it. This should save you a lot of memory and the tests won't take as long. In fact they're a lot shorter.

 

How much history do you have, and what are your settings for "max bars..." under Tools/Options/Chart? More bars means more memory gobbled up.


If the max values are set to a high number, then adjust it down so it is just enough for the date range you are interested in testing.

Reason: