History ticks data in EA tester is very different from live ticks data from same broker

 

I am trying to find out why my EA doesn't work on live data. Here is what I found out:

 

data diff from history and live 

 

Left section is real live tick from demo account, whereas right section is the history tick from same demo account. The broker I am using

is ActivTrades.  

First column in left section is datetime, seconds since 1970.01.01. 2nd column is bid, and 3rd column is ask. 

As you can see, the tick count is different and even the each individual tick is sometimes difference. I believe this difference result my EA not working on live demo account while working on history data. 

 The possible reasons I speculate:

1. network transfer loss:  

    My connection time to server is 296ms which is shown by clicking bottom right icon MT5 terminal. live demo data is sent directly from server, but history data is downloaded       afterwards. So history data is more completed and has better quality than live ticks. 

2. MT5 program bugs:

   Maybe MT5 uses some hash parity checks to choose which live tick data is acceptable. This unknown feature somehow results to the difference between live ticks and history ticks. 

 3. My tick save script error 

I really hope it is my mistake. Here is my script to save all the ticks. Please help me find out if it is due to the bugs in my tick save script. After I got a full day ticks from live demo account (you have to attach saveAllTicksFullTick EA to chart and wait for one day, server time), then run this script on Strategy tester for the same day period. After you got 2 files you can use Beyond Compare to compare the difference. 

 

 

Question:

What results to this difference?  

how to get around this problem?  

 Thanks!

Files:
 

It doesn't work like that, not all ticks are replicated when tester.

read this article:

Algorithm of ticks' generation

 
Marco vd Heijden:

It doesn't work like that, not all ticks are replicated when tester.

read this article:

Algorithm of ticks' generation

Thanks a lot for providing this article to me. I just learned that ticks in Strategy Tester is generated based on one minutes bar, not actual historical ticks. 

I'd like to ask for a follow up question. How do I test EA against actual historical ticks data, not tick data simulated based on M1 bar? Thanks!

 
nicolasxu:

How do I test EA against actual historical ticks data, not tick data simulated based on M1 bar? 

Not possible with tester.

Run a real test on a demo account or a live test with low safe lot size to test things out.

I always put my new EA on my VPS and let it run for a month to get an first idea about performance. 

 
Marco vd Heijden:

Not possible with tester.

Run a real test on a demo account or a live test with low safe lot size to test things out.

I always put my new EA on my VPS and let it run for a month to get an first idea about performance. 

Thanks a lot!
 
That's the same as diffirential of demo and real accounts. Not the same results ;)
 
nicolasxu:


You have an option to port your EA to MT4 and test it there on real ticks. You may find some advices on this forum how to obtain real ticks data and then "plug" it into fxt-file used by the tester.
Reason: