Strategy tester appears to be skipping large chunks of time

 

Hi everyone. I'm having a strange problem with the strategy tester. I ran a test that started at 2015 until the current date and when I looked back at the chart it seems like the tester didn't place any trades for over a whole year, at two points even.

Could this just be a visual bug? I attached the chart for reference. It traded on the M15 time frame but I zoomed out to the daily chart for a bigger picture, both timeframes show the same thing however.

Files:
EURUSDDaily.png  97 kb
 
tnil25: Hi everyone. I'm having a strange problem with the strategy tester. I ran a test that started at 2015 until the current date and when I looked back at the chart it seems like the tester didn't place any trades for almost a whole year. Could this just be a visual bug? I attached the chart for reference. It traded on the M15 time frame but I zoomed out to the daily chart, both timeframes show the same thing however.

It is more likely that the EA has a bug in it! That happened to me many times and was using my own tick data, so I knew that the data was there. Many times, it was just a logic bug in the EA.

So, debug and check how your EA is working during those time periods and you should be able to find the fault in the code.

If however, you still think its a data or tester problem, then just have your EA print out debug information on the data and testing during that time period so you can see for yourself where the problem may be.

 
PS! Also, if your EA is using Multi-timeframe data, check for sync problems in your EA.
 

About bugs in strategy tester: When I had similar problems, It was invalid state in my variables, because I forgot to reset the estate each new day. Find if you forgot it in the OnInit and in OnTick when the day changes. 

About dates and strategy tester: forget about TimeCurrent(), it's harder to debug. Prefer to use the time of last candle or tick and control the datetime increment with a variable.