Backtest doesn't match forward test

Discussion of the latest application betas including reports of bugs, issues and suggestions before it is made available as a general release.
Post Reply
jt27
Posts: 14
Joined: Wed Jun 08, 2016 4:06 pm

Backtest doesn't match forward test

Post by jt27 »

I've been live testing my EA for a couple of months now and so I've got some real historical data to look at. My results in the backtester don't come anywhere close to matching my live forward testing. My EA relies on multiple time frames and I've seen mixed sentiments online as to whether or not MT4 can reliably backtest an EA using multiple time frame analysis. I'm using tickstory data and get 99.9% accuracy in the tester. Any thoughts?

jt27
Posts: 14
Joined: Wed Jun 08, 2016 4:06 pm

Re: Backtest doesn't match forward test

Post by jt27 »

Hoping I can get some input from Tickstory support on this? To reiterate, I've got months worth of live testing results. When I backtest over the same period using same EA, same parameters, etc. the backtester results don't look anything like what actually happened when live testing. I'm not talking small differences due to spread, slippage, etc. I'm talking about trades executing when they shouldn't or not executing when they should in the backtester. My EA looks at multiple timeframes and I'm wondering if someone from Tickstory can comment on whether or not the backtester works with multiple timeframes? Has it been tested/validated with EA's using multiple timeframes?

tickstory
Posts: 4899
Joined: Sun Jan 06, 2013 12:27 am

Re: Backtest doesn't match forward test

Post by tickstory »

Hi Jt27,

Firstly, our apologies for the delay in getting back to you.

Regarding your question, multi-timeframes is supported by MT4 however you should be cautious about how your EA is coded. In any MQL function that allows you to specify the time-frame (for example, iMA() to get the moving average), you can use a default time-frame parameter of "NULL" which implies to use the current timeframe. In the case of the Strategy Tester, the "current timeframe" is the selected "Period". In the case of a live EA, it will be the currently selected chart timeframe you are testing in (M1, M5, etc). Obviously if there is a mismatch between these two time-frames then your test and live results will be significantly different. Of course, if you have explicitly specified the time-frames in each of your EA's MQL function calls, this should not be an issue.

If the above does not address your issues, the best approach is always to take the first trade of your live EA and compare it against your back-test. An in-depth analysis of why the trade was taken in each case will help you understand which parameter/condition is causing the differences.

Just in case you haven't previously read our FAQ on this topic, please refer to this link which gives some more information.

Hope this helps.

Post Reply