need improvements in tester simulation

 



this an example of tester jumping like crazy on 1M chart. There were only 22 ticks on that bar with spread of about 30 pips.

Its incomperehensible how it could go up and down like that on such a light volume.



This is the same running on the demo account. It doesn't have 2 etxra trades resulting in about $3000 extra profit.



Finally same tester run after the following was inserted into the code:

datetime samebartime;
 
int start()
  if(IsTesting())
  {
      if(iTime(NULL,PERIOD_M1,0)==samebartime)
        return(0);
   }
 
 
.....
 
 
ordersend(....
samebartime=iTime(NULL,PERIOD_M1,0);


I don't know how ticks are generated within a 1M bar, but it seems they should go more or less successively from open to close. That's how it work in real life most of the time.

 
There's been lots of topics about the same problem recently, where I wrote my thoughts on this. I've been working on this issue for the last months..
Generated ticks are not better than random on the smallest timeframe. You cannot simulate better though in my opinion, since you don't have enough data.
Otherwise write out the generated ticks to a file, and you will see why I am talking about it being random.
Strategy tester is a very good basis though, and it is capable of importing real data.
Reason: