How to Cap RAM Usage in MT5?

 
When doing optimization backtests in MT5 it uses all of my available RAM and basically freezes my PC until the test is finished. sometimes resulting in complete crashing. Is it possible to set a cap/limit on the amount of RAM MT5 can use when doing a backtest either in windows or in MT5 itself? 
Testing trading strategies on real ticks
Testing trading strategies on real ticks
  • www.mql5.com
The article provides the results of testing a simple trading strategy in three modes: " 1 minute OHLC " using only Open, High, Low and Close prices of minute bars; detailed modeling in " Every tick " mode, as well as the most accurate " Every tick based on real ticks " mode applying actual historical data. Comparing the results allows us to...
 

Don't optimize with real ticks over a long period.

This means a huge amount of data regardless which timeframe you are using packed in the RAM. If you now use all your kernels twice due to hyperthreading the pc starts immediately with an extensive swapping - have you watched the led of the hd access - anything else dies on the pc.

 
Carl Schreiber:

Don't optimize with real ticks over a long period.

This means a huge amount of data regardless which timeframe you are using packed in the RAM. If you now use all your kernels twice due to hyperthreading the pc starts immediately with an extensive swapping - have you watched the led of the hd access - anything else dies on the pc.

I'm complaining about this issue allready a very long time and I'm optimising with 1 minute bars over 3 years of data. I've noticed that with latest releases  (I'm using beta 2652), the problems are much less than before.

But there's still a memory management problem in the backtester. I have a AMD Ryzen 9 3900x with 32 GB RAM and very fast SSD. The problems arise when you optimise with a lot of passes.


Regards,

Danny

 
If your pc becomes to small for the challenge use the tester agents of the cloud MQ offers!
 

Agents do not work with DLL's ..

 
Carl Schreiber:
If your pc becomes to small for the challenge use the tester agents of the cloud MQ offers!

I am using custom symbols, going back 3 years, with about 25 passes per optimization. Even with just every tick modelling it still instantly shoots my ram up to 100%. It has always done this and normally it is fine, but recently after a while it freezes my pc completely and I have to restart. 

 
Some Customized indicator take lot of memory (or CPU intensive), you may want to get someone to look at your EA or customized indicator code.
 

Hi all,

I have 2 PC' s with AMD Ryzen 9 3900x, 32 GB RAM and a very fast SSD (1 T) both with Beta release 2656.

Durinng the optimising one PC generates memory problems and does not (only 3 passes) continue with optimising.

My other PC with exactly the same software but another currency continues optimising (96 passes) and generates no problems.

This illustrates very clearly the problems with the memory management during the optimising proces.

 
Either add more RAM, or disable some agents in order to not consume all memory.
 

Meta Trader 4 has the same EA, Meta Trader 5 has very high memory usage.



 
@Mehmet Ozhan Hastaoglu #: Meta Trader 4 has the same EA, Meta Trader 5 has very high memory usage.

In your screenshot, it is MT4 that is using more memory. It shows MT4 using 526.5 MB versus MT5 using 423.3 MB of RAM.

EDIT: However, CPU usage for MT5 is over 90% in your screenshot. It seems you have a faulty Indicator or EA running on it.