Hi frineds,I'm going to backtest my EA on MT4 so I installed four MT4 in differenet directories and downloaded the historical data to backtest my EA for the 3.5 previous years.
I started to backtest without using "visual mode" on all four MT4s and it worked well for about 6 hours but after that all four MT4s stopped their backtest process with the following error:
"Tester memory handler: tester stopped because not enough memory"
I searched through the forum about this without any success as most of the responses was about reducing the number of bars on chart while I'm not using any visual or chart for the backtest so I think that would not be case.
I'd appreciate if anybody could help me on the issue as I think one of the most important part of trade automation is having a meaningful backtest.
Thanking in advance,
How about a smaller lotsize ?
Or check to see if there is enough capital to make the order ?
One of the most important part of trade automation is that the logic is profitable, not the backtest and not the meaningful backtest.
It seems you dont have Enough Memory to test these huge counted ticks,each pair which you want to backtest has at least above 2million ticks,that the MT4 wants to create
the .FXT file and load it on your memory to backtest for each every tick,your memory wont have enough memory to load all data from .FXT,after sometimes it will be stopped
by maximum memory usage,No matter how the "visual mode" or "reducing number of bars" is,So you need more space on your memory,
Thank you for your response,
I don't think that would be the problem because the lot size are so small and there is sufficient capital on the tester account.
The laptop I'm doing backtest on has 16GB Ram and about 80GB free SSD space. Even if we suppose that the problem was about the lack of memory so after closing thre MT4 then the fourth one would not be close as closing the other three MT4 would free up the memory for the fourth one but as you can see the fourth MT4 was closed as well.
I think we need to look for other reasons for the issue.
Thank you for your clarifying response,
Could you please guide me where the memory is used? I mean whether the memory is used on log files or it is used anywhere else so that I can manage it. As you mentioned it can't use more than 3GB but where this 3GB is used ? what do you mean by it can't use more than 3GB? Does this 3GB consumed through log files or it is consumed through the history or anywhere else?
My problem is that I don't know where the memory is consuming ! If I know where it is consumed then I can manage it.
And what about the solution ? what should I do to avoid this error?
Is the above-mentioned issue solved on MT5 or the MT5 platform has the same problem as well?
A log file has nothing to do with memory, it's a file.
The problem is most probably in your code, it can eventually be a problem with MT4. First think to do is to check your code and find where is the memory consumed.
EDIT: maybe @Mehrdad Jeddi is right and it's an MT4 issue due to too muck ticks. Difficult to say without knowing all details about your tests.
OK,So you could see the .FXT tick data file in Tester/History and see the EURUSD.fxt (or the pair which you are testing) files size,i think it's bigger than 2GB file size,
Yes, it is bigger than 2GB
So I'd really appreciate if you kindly guide me about what is the reason of the problem?! I can not find it out ! You guided me to fix my code but I see no explicit problem with it so I'd appreciate if you kindly guide me where do you think the problem come from ?
I didn't understand whether this problem exist on the MT5 as well or it is solved on MT5?
Please enable the necessary setting in your browser, otherwise you will not be able to log in.