Page 1 of 1

MT4 optimizer accuracy

Posted: Wed Apr 11, 2018 10:01 pm
by huangwh88
Hello,

I tried the backtest optimizer in MT4, but it seems that the net profit results from each of the runs is very different compared to when I conduct each run individually without optimization.

Does the optimizer run the backtests to 99.9% modelling quality?

Re: MT4 optimizer accuracy

Posted: Sat Apr 14, 2018 1:30 am
by tickstory
Hi Huangwh88,

Yes, the optimizer does work but you should check the following:

- That are comparing the results of back-tests ensuring that the parameters are the same. This includes ensuring spread is not set to "current" and that your EA doesn't potentially result in different trades if you use a different time period (for example).
- If you continue to have issues, ensure that your FXT files are under 4GB as this can cause some problems due to MT4 limitations.
- You might also try to ensure you do not restrict the time period you are back-testing (i.e. uncheck 'Use dates')
- If you still have problems, try clearing your Strategy Tester cache as described in this post:
https://tickstory.com/forum/viewtopic.php?f=4&t=1636

Hope this helps.

Re: MT4 optimizer accuracy

Posted: Sun Apr 15, 2018 1:44 pm
by Glazier
Hi Tickstory, I'm having the same issue, or at least I think I am. The FXT files are well over 4GB large so I'm guessing that's the issue. What do I do in this situation?

Re: MT4 optimizer accuracy

Posted: Sun Apr 15, 2018 11:53 pm
by tickstory
Hi, You should break down your back-testing periods so they are around 1-2 years. This should be within the 4GB limitation and will also help ensure you are not curve-fitting during your optimization.

Re: MT4 optimizer accuracy

Posted: Mon Apr 16, 2018 3:41 am
by huangwh88
tickstory wrote:Hi Huangwh88,

Yes, the optimizer does work but you should check the following:

- That are comparing the results of back-tests ensuring that the parameters are the same. This includes ensuring spread is not set to "current" and that your EA doesn't potentially result in different trades if you use a different time period (for example).
- If you continue to have issues, ensure that your FXT files are under 4GB as this can cause some problems due to MT4 limitations.
- You might also try to ensure you do not restrict the time period you are back-testing (i.e. uncheck 'Use dates')
- If you still have problems, try clearing your Strategy Tester cache as described in this post:
https://tickstory.com/forum/viewtopic.php?f=4&t=1636

Hope this helps.
Hi Tickstory,

Turns out the problem was the cache. After clearing it my optimizer shows the same results as the individual 99% tests. Thank you.

One question about the 'use dates' option in strategy tester: I ran a backtest with 'use dates' unchecked, assuming that MT4 will use all the available data.
Then I checked 'use dates', and specified a date range which occupies all my available data, and ran the same test.
Results have minor differences though. What causes the difference?

Re: MT4 optimizer accuracy

Posted: Tue Apr 17, 2018 10:39 am
by tickstory
Hi Huangwh88,

Good to hear that the issue is solved. Re: dates, not sure what would cause this, you might want to check to see whether a trade was started at a different time/date?
The reason why it's suggested to remove the "Use dates" check-box is to discount the possibility of MT4 starting at the incorrect date. This can sometimes occur when 4GB FXT files are used but in normal circumstances it should work as far as we know.

Thanks.

Re: MT4 optimizer accuracy

Posted: Wed Apr 18, 2018 1:48 am
by huangwh88
tickstory wrote:Hi Huangwh88,

Good to hear that the issue is solved. Re: dates, not sure what would cause this, you might want to check to see whether a trade was started at a different time/date?
The reason why it's suggested to remove the "Use dates" check-box is to discount the possibility of MT4 starting at the incorrect date. This can sometimes occur when 4GB FXT files are used but in normal circumstances it should work as far as we know.

Thanks.
Hi Tickstory,

I compared the trade histories for both versions (with and without 'use dates' checked). I have data exported till 14-Sep 2017.

With 'use dates' checked (end date is 14-Sep), the last trade closes on 13-Sep at 2359 hrs. All's good.

But without 'use dates' checked, the last trade closed on 15-Sep. Where does the 15-Sep data come from? I assumed that launching MT4 via tickstory will prevent MT4 from using the default history centre data.

Re: MT4 optimizer accuracy

Posted: Thu Apr 19, 2018 12:08 pm
by tickstory
Hi, Please check your data in your MT4 Data Center for these new dates. If you are connected to your broker then it will automatically try and back-fill. You can prevent this by disconnecting (just enter an incorrect password upon login). Best practice is to have a separate, disconnected terminal purely for back-testing if you haven't already.

Thanks.

Re: MT4 optimizer accuracy

Posted: Fri Apr 20, 2018 8:45 pm
by huangwh88
tickstory wrote:Hi, Please check your data in your MT4 Data Center for these new dates. If you are connected to your broker then it will automatically try and back-fill. You can prevent this by disconnecting (just enter an incorrect password upon login). Best practice is to have a separate, disconnected terminal purely for back-testing if you haven't already.

Thanks.
Thank you. I went offline and deleted all the history center data, but still the trade closed one day outside the exported history range.

Nonetheless, the difference is small so it doesn't bother me much.