I have deleted your new topic as it seems to be the same subject matter as this one.
Do not duplicate topics.
Keep your discussion concerning your issue here.
I'm having almost the same issues.
Once I import the old .opt optimization files, why doesn't Strategy Tester run them?
Is there a way to let them work again? Please help.
I have more than 1.000 old tests and I have to open them.
IMPORTANT NOTE: Even if I had opened and used the old caches( .opt files), They are all deleted after 30 days automatically.
But here: https://www.metatrader5.com/en/terminal/help/algotrading/strategy_optimization#cache
It says :
- For optimize disk space usage, cache files are automatically deleted if they are not accessed within 30 days.
But as I said, I used many of them before 30 days but they are all gone!
![Strategy Optimization - Algorithmic Trading, Trading Robots - MetaTrader 5 Help Strategy Optimization - Algorithmic Trading, Trading Robots - MetaTrader 5 Help](https://c.mql5.com/36/60/strategy-optimization-algorithmic.png)
- www.metatrader5.com
Here is how you can stop mt5 terminal from deleting .opt cache files:
-> manually navigate to the cache folder (\data folder\Tester\cache)
-> right click and go to properties on the recently generated .opt file(s) (in case of forward testing enabled, there are two .opt)
-> set file(s) as read only by clicking on Read-only checkbox and press okay.
-> Now when the Mt5 terminal try to delete opt cache, it wont be able to.
-> Enjoy.
This is only to keep the files from deleting. Files not being able to be read properly or forward results not showing is a separate problem.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Does anyone know how to force MT5 terminal to NOT delete optimization cache files older than 30days? I want to be able to load older cache files into the terminal for analysis of forward results and I cannot find how to stop this deletion of cache files.
The only option I'm aware of that the terminal will not delete them after 30days if the cache file has previously been accessed. However there are several issues with importing optimization cache data in to mt5 and then having have multiple cache files in the folder.
Firstly, when importing a optimization cache it will often fail to load the forward results. So you can import the cache file, and only the Optimization results tab shows...the forward results tab is not there.
And then when it does load the forward results often it will often load the incorrect forward results cache...how it can do this I have no idea...but it does.
The ONLY reliable way I have found to load an optimization cache with the correct forward results is to close the terminal, manually delete ALL files in the tester/cache directory and then copy/paste the optimization cache files you have saved previously from an optimization/export into the tester/cache directory and restart the terminal.
This is the only way I have found to ensure the correct cache files are loaded and that the forward test tab shows up. Delete everything apart from the cache files you want to load.
I have tried to resolve this issue using a fresh new terminals, and most recent update, and then import then restart, close and manually import...nothing works consistently apart from the above method.
The issue I now face is that MT5 deletes cache files older than 30days if its not previously accessed , to save space. It must somehow flag the cache file as being previously opened and this bypasses the auto delete function.
This auto delete causes an issue as to get the correct cache to load, I must clear the cache then manually copy/paste cache files into the folder and so once I restart the terminal it see that there are cache files older than 30days and delates them.
This means I cannot load cache files older than 30days to review and analyses as the terminal automatically deletes them.
can anyone help override this auto delete function?