Download MetaTrader 5

Meta Trader 4 Strategy Tester Speed Improvment ??

To add comments, please log in or register
Young Ho Seo
20357
Young Ho Seo  

Hi Fellow Traders and Coders.

I really wish that Meta Trader 4 Strategy Tester is like Meta Trader 5 Strategy tester because Meta Trader 5 terminal strategy tester is a lot faster. T T

Really the slow speed of MT4 terminal strategy tester sometimes bottlenecking development work. I am sure it is what many developer is experiencing at the moment with Meta Trader 4 terminal.  

Does anyone has some good suggestion or solution or any ways to improve the speed of strategy tester in Meta Trader 4 terminal ?

It will be great if you share your wisdom. :)

Kind regards.

F.E.

Dr. Trader
3914
Dr. Trader  

There are not so many tips:

  • If your EA is working only on new bars, then there is no need to test it in all ticks mode, use just ohlc.
  • Its good to have ssd hard drive which is used for mt4 data folder (file->open data folder should open location on ssd drive). All tester files will be written and read much faster.
  • If you are using custom indicator with iCustom, but you have indicator source code - copy indicator source code directly into EA, to use it without iCustom call.
  • Thats's probably all I know :) 

 

Do the code profiling (Debug->Start Profiling), it will show all code bottleneck points. Its available only for real run attached to chart, and not available in tester; but if you will improve EA performance for real run on chart - it will be faster in tester too.

Once I have speed up EA performance for around two times based on profiling report, by changing few things like these:

//unoptimized
int array1[];
//...
for(int i=0; i<ArraySize(array1); i++){
   //...
}

//speed-optimized
int array1[];
//...
int array1size = ArraySize(array1);
for(int i=0; i<array1size; i++){
   //...
}

//unoptimized
for(int i=0; i<OrdersHistoryTotal(); i++){
   //...
}

//speed-optimized
int historysize = OrdersHistoryTotal();
for(int i=0; i<historysize; i++){
   //...
}
Young Ho Seo
20357
Young Ho Seo  
Dr.Trader:

There are not so many tips:

  • If your EA is working only on new bars, then there is no need to test it in all ticks mode, use just ohlc.
  • Its good to have ssd hard drive which is used for mt4 data folder (file->open data folder should open location on ssd drive). All tester files will be written and read much faster.
  • If you are using custom indicator with iCustom, but you have indicator source code - copy indicator source code directly into EA, to use it without iCustom call.
  • Thats's probably all I know :) 

 

Do the code profiling (Debug->Start Profiling), it will show all code bottleneck points. Its available only for real run attached to chart, and not available in tester; but if you will improve EA performance for real run on chart - it will be faster in tester too.

Once I have speed up EA performance for around two times based on profiling report, by changing few things like these:

This is superb tips. Thanks for sharing. :)

Simon Gniadkowski
Moderator
18021
Simon Gniadkowski  
FinanceEngineer:

Hi Fellow Traders and Coders.

I really wish that Meta Trader 4 Strategy Tester is like Meta Trader 5 Strategy tester because Meta Trader 5 terminal strategy tester is a lot faster. T T

Really the slow speed of MT4 terminal strategy tester sometimes bottlenecking development work. I am sure it is what many developer is experiencing at the moment with Meta Trader 4 terminal.  

Does anyone has some good suggestion or solution or any ways to improve the speed of strategy tester in Meta Trader 4 terminal ?


Reading this thread may help you:  https://www.mql5.com/en/forum/144240
Young Ho Seo
20357
Young Ho Seo  
RaptorUK:
Reading this thread may help you:  https://www.mql5.com/en/forum/144240

Definitely very helpful link. Thanks.  

Sometime, wish we could have hybridized terminal between MT4 and MT5 combining best of both world.

Regards.

Pankaj D Costa
2738
Pankaj D Costa  

Thanks all. Mentioned links and information is really helped me.

Thanks. 

To add comments, please log in or register