Memory Limit with MetaTrader Terminal. - page 3

 
oddpip:
If MT just freeze, could be the EA enters in a infinite loop? Like bouncing forever between two states?

Definitely not. As I mentioned before, if I use smaller loop, then the calculation is completed and there is no freeze in the EA.

 

smaller loop: for(int i = 0; i < 100; i++)
larger loop: for(int i = 0; i < 1000; i++) 
 
It might be a long shot but have you tried the Event Viewer? It might offer some clue if an error is logged there.
 

I believe your problem lies in software memory management side.  

Not hardware.  It's just like (almost) every Intel processor comes with a Turbo Boost Technology.  But whether your motherboard support Turbo Boost Technology or not, or whether did you switch on the Turbo Boost Technology switch in your motherboard is the question!!  If your processor has this feature but your motherboard don't support or you just simply didn't or forgot to switch on, it will only run in normal speed and may even experience problems because its optimal performance is only when you switch on Turbo Boost Technology in your motherboard and allows the processor to run optimally.

You may want to try to find and download some third party memory management software to run in your PC / dedicated VPS and see if MT5 gives problems or not when run with your EA.

By the way, what is the Windows OS you're using?  Trying using newer OS like Windows 8 if you have it.  I normally stop using older OS due to some persistent problems from some applications and upgrade to newer OS and the problems disappear. 

Hope it helps and good luck!

 

I also have a problem of memory on a EA using many loops & loops inside the loops, I want to optimize. The remote agent show the memory ontick error, same when the cloud not used.
The code is clean, everything has been ZeroMemoried & ArrayFreed, even the indicator used is released. I feel very frustrated.

Reason: