Mt4 Strategy tester Cache issues ?

 

I am not sure whats going on but does mt4 strategy tester cache previous backtests ?
because I am seeing something strange in  backtesting , I set parameters and run backtest on last 12 years , and it shows net return of let say 200$ , So I slightly change the input settings but it still shows 200$ return which is weird because I know the new setting should cause way less number of trades to open so the total return should also be less than what it showed in the last test 

I am using : 

Testing Model : Control Point 
without the Visual Mode 


has any one faced something like this before ?


PS: I coded the EA and I am sure that the Code is fine , there is no bug which could be causing this.

also when I restart the mt4 and run the test again , it will then show different test result but then after 1-2 test it start causing the same issue again 

 
Arman: I am not sure whats going on but does mt4 strategy tester cache previous backtests? because I am seeing something strange in  backtesting , I set parameters and run backtest on last 12 years , and it shows net return of let say 200$ , So I slightly change the input settings but it still shows 200$ return which is weird because I know the new setting should cause way less number of trades to open so the total return should also be less than what it showed in the last test. I am using : Testing Model : Control Point without the Visual Mode. has any one faced something like this before ?

Yes, there are cache files. You can delete them if they are causing an issue. They should be in the "\tester\caches" folder. However, when the cached files start failing, it is also a sign that there are bugs in the code causing issues, such as memory leaks, or lack of proper initialisation of globally scoped variables.

You can also delete the ".fxt" files if you want them regenerated. They are in the "\tester\history" folder.

Remember also to use fixed spread in the test instead of "current", as that will change between tests causing some problems in optimisations.

 
Fernando Carreiro #:

Yes, there are cache files. You can delete them if they are causing an issue. They should be in the "\tester\caches" folder.

You can also delete the ".fxt" files if you want them regenerated. They are in the "\tester\history" folder.

Thanks for the confirmation Fernando 

 
Arman #: Thanks for the confirmation Fernando 
I've updated my post, so please do read it again as I've added some text.
 

The attached are "dots into the future" , trades showing ahead of the MT4 bar generation while running a backtest.

Is that also related to the cache issue discussed here?

I checked the caches and history folders and they are empty.

I also noticed 2 red lines spreading out of an entry trade ending in two different closing prices. (not far from each other).

One is reported in the the Results tab the other is not. Clearly the other was a trade from a previous backetest (I suppose).

Is there a way around completely cleaning this issues ?

Files:
 
cmarconetti #: The attached are "dots into the future" , trades showing ahead of the MT4 bar generation while running a backtest. Is that also related to the cache issue discussed here? I checked the caches and history folders and they are empty. I also noticed 2 red lines spreading out of an entry trade ending in two different closing prices. (not far from each other). One is reported in the the Results tab the other is not. Clearly the other was a trade from a previous backetest (I suppose). Is there a way around completely cleaning this issues ?

That is probably because you saved those graphic objects into the tester template, once upon a time.

Either delete or recreate the tester template file — "Tester.tpl"

 
Fernando Carreiro #:

That is probably because you saved those graphic objects into the tester template, once upon a time.

Either delete or recreate the tester template file — "Tester.tpl"

thank you
 
cmarconetti #: thank you
You are welcome!
 

Just to cover or the possible issues, in order to clear the tester chart from leftovers objects one should:

1) clear the tester\caches

2) clear tester\history

3) clear tester\files

4) delete templates\tester


Would that cover it?

It is also possible to go to the menu to Charts->Objects->Objects List and manually deleted them.

(I have seen objects remaining for months about backtesting) .


Please let me know it there is sill more to dig here.

Thank you as always

 
cmarconetti #: Just to cover or the possible issues, in order to clear the tester chart from leftovers objects one should: 1) clear the tester\caches 2) clear tester\history 3) clear tester\files 4) delete templates\tester. Would that cover it? It is also possible to go to the menu to Charts->Objects->Objects List and manually deleted them. (I have seen objects remaining for months about backtesting). Please let me know it there is sill more to dig here. Thank you as always-

That seems like overcompensating for the issue of the dots on your chart. All you have to do is open a new clean chart, and then save it to the tester template.

However, were you not able to clear the dots after all those steps taken?

If not, then you may have to delete or recreate the default template too — "Default.tpl". This is the template that is loaded when you open up a new chart.