Caching Issues with MT4 optimization strategy tester

 

I am not able to run new optimization test on MT4 backtesting further, as every time I try to run it I get zero results and on the journal it says something like this "There were <n> passes done during optimization".



I have searched the interenet and have performed the following without any result:
1. I have deleted files in the \tester\cache folder

2. I have gone to the "Optimization Results" tab, right-click and selected "Skip useless Results". See below.


And on re-running optimization, it still does not work. Any solutions is greatly appreciated.

 
The previous topic was deleted/hidden as requested. 😉 ( https://www.mql5.com/en/forum/487223#comment_56774567 )
____________________________________________________________

The optimizer is running but your EA is not generating any trades, every pass shows zero results.

This typically means that the trade conditions are never met either due to the logic itself or overly restrictive input values.

Run a single backtest without optimization and check the Journal. If you still get no trades the issue is definitely within the EA.
 
Miguel Angel Vico Alba #:
The previous topic was deleted/hidden as requested. 😉 ( https://www.mql5.com/en/forum/487223#comment_56774567 )
____________________________________________________________

The optimizer is running but your EA is not generating any trades, every pass shows zero results.

This typically means that the trade conditions are never met either due to the logic itself or overly restrictive input values.

Run a single backtest without optimization and check the Journal. If you still get no trades the issue is definitely within the EA.

Thank you for responding, I have been waiting for someone to really help me.

I understand what you are suggesting regarding overly restrictive input values but in this case, each of the value would return trades individually. For example, here below (but I stopped it early just to show that there are trades taken). 


So, the issue that I have is that optimization does not work at all anymore. Even if I closed MT4 instance and restart it. I am gobsmacked. I am not new to MT4 and have run optmization many times before, and never come across this behaviour.

On the Journal tab, this is what I see, but I don't know where these cache records were coming from? Even if I chose different parameters for optimization, the run was never successful:

2025.05.25 09:01:28.120 There were 6 passes done during optimization

2025.05.25 09:01:28.102 EA MTF: optimization finished in 0:00:00, 6 cache records were used

2025.05.25 09:01:28.091 EA MTF: optimization started


 
Could anyone else provide some insights? 

Much appreciated!!! I am really stuck.
 
Helllppp.  Anyone there? :-)
 
Growth #Helllppp.  Anyone there? :-)

Since you've already tried all the usual steps, this looks like an issue with MT4's internal cache. Sometimes, even after deleting \tester\cache, MT4 still reuses old records.

I recommend:

  • Delete everything in these three folders: \tester\cache\, \tester\history\, \tester\logs\.
  • Make a copy of your EA with a different name, change something minor in the code (like a comment), recompile it, and run the optimization again. This forces MT4 to rebuild the cache.
  • If that doesn't help, try running the EA in a clean MT4 installation.

It's rare, but this can happen. If none of that works, it might be a bug in your current setup or MT4 build.

If you plan to do frequent or large-scale optimizations, you might want to consider using MT5, which has a more modern and stable optimization framework. It's not perfect either, but it's generally more reliable and transparent for this type of task.