How to Cap RAM Usage in MT5?

49f89v
57
49f89v  
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...
Carl Schreiber
Moderator
11018
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.

Daniel Weckhuyzen
216
Daniel Weckhuyzen  
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

Carl Schreiber
Moderator
11018
Carl Schreiber  
If your pc becomes to small for the challenge use the tester agents of the cloud MQ offers!
0xA0B1 FX5
117
0xA0B1 FX5  

Agents do not work with DLL's ..

49f89v
57
49f89v  
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. 

firecard
804
firecard  
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.
Daniel Weckhuyzen
216
Daniel Weckhuyzen  

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.

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