strategy tester speed in MT4

 

I am doing extensive back-testing on a number of EAs that I have developed and find that the strategy tester runs far too slowly when set to 31 and far too fast when set to 32. Does anyone know where the settings for the speed of the strategy tester are located? I assume that it is a setting in the registry or in an .ini file that controls this, but I have not been able to find where this value is stored. Any help with speeding up the less than max speed of the tester would be very much appreciated.

 
wasard:

I assume that it is a setting in the registry or in an .ini file that controls this, but I have not been able to find where this value is stored.

I looked into this a while back and as far as I know there is no setting for this (but perhaps I just couldn't find it?).


Any help with speeding up the less than max speed of the tester would be very much appreciated.

Anyway, at the time I thought a possible solution would be to add some time consuming code at the end of start() function to make the whole thing slower (while working at speed 32), but I never got around to try it. It might or might not work, depending on if the Tester calculates in 'real-time' while in visual mode (which I never tested). You can try it out.

 
32 runs at cpu speed, 31 runs at ~30% on my laptop. Try using BES or Threadmaster
 

I think I have found the answer to the problem. I inserted the following code after the start() …

extern int speed = 500; // Control speed of the chart speed when using strategy tester in visual mode

….

….

int start()

{

if(IsVisualMode()==true)

{

Waitloop = 0;

while(Waitloop < speed){Comment("Wait Loop Count = ", Waitloop); Waitloop ++;}

}

….

….

….

Return(0);

}

By changing the value of speed between 100 and 100000 or so you can control the speed of the chart display in the visual mode, but leave the speed unaffected in any other mode.

 
wasard:

I think I have found the answer to the problem. I inserted the following code after the start() …

extern int speed = 500; // Control speed of the chart speed when using strategy tester in visual mode

….

….

int start()

{

if(IsVisualMode()==true)

{

Waitloop = 0;

while(Waitloop < speed){Comment("Wait Loop Count = ", Waitloop); Waitloop ++;}

}

….

….

….

Return(0);

}

By changing the value of speed between 100 and 100000 or so you can control the speed of the chart display in the visual mode, but leave the speed unaffected in any other mode.

Your a Legend Wasard! I used this code and it worked like a charm. Thankyou!
 
LOL... I posted a video on this back in Sept, 2014. Using a comment to slow down the tester... guess nobody saw it. I still wish there was a better way.
 
  1. My PauseTest() I call it at debug points, when it opens/closes orders etc. No need to slow it down, stop it when something changes.
  2. also there's 'Strategy Tester Equalizer' indicator by 'zmeszaros'

 

Hello,

Sorry to answer that late but one solution I have in case your EA under test only considers open of candlesticks/bricks, you can stay in pause and use the step-by-step function, F12 key on my computer. It could not be what you were looking for but it works quite fine and for Renkos, if you have more than one brick in the same minute, it stops on every one of them. That's all I have in store but actually, I like the step-by-step concept! I have tried wasard's piece of code but it didn't work well so far.

Hope it would have helped someone.

Reason: