Download MetaTrader 5

my backtest runs faster and then slow down

To add comments, please log in or register
Dua Yong Rew
5481
Dua Yong Rew  

When I run backtest, it is very fast at the begining but as it progress like after 50%, it starts slowing down coming to a crawl

what is the problem? coding or I need to zeromemory all my variables? 

Alain Verleyen
Moderator
32442
Alain Verleyen  
doshur:

When I run backtest, it is very fast at the begining but as it progress like after 50%, it starts slowing down coming to a crawl

what is the problem? coding or I need to zeromemory all my variables? 

Which start/end dates, symbols ?
Dua Yong Rew
5481
Dua Yong Rew  
angevoyageur:
Which start/end dates, symbols ?

eurusd

year 2011 feb 1 to 2014 feb 1 

Alain Verleyen
Moderator
32442
Alain Verleyen  
doshur:

eurusd

year 2011 feb 1 to 2014 feb 1 

Either a coding issue in your EA, or maybe the volume (tick count) is increasing after a given date ?
Dua Yong Rew
5481
Dua Yong Rew  
angevoyageur:
Either a coding issue in your EA, or maybe the volume (tick count) is increasing after a given date ?
No problem if I use olhc price. Only every tick has this issue.

Do I need to use zeromemory?
Erdem Sen
1742
Erdem Sen  

when you get the results look at the quality of tick history if it is bad  at some where in that interval (if there are green and red areas) may be that causes this situation, may be you should try to use an other server and downlod data again.

and do you use cloud or local agents? I experienced some slowing down in cloud. (I guess when the faster agents finish their tasks, the slower agents left still proccessing and that generates a slowing down)

Dua Yong Rew
5481
Dua Yong Rew  

am running the backtest on my pc, not doing optimizing

Im using data from my broker and re-download the data is still the same

 

btw, re download the data means I go to the folder to delete which file?

Dua Yong Rew
5481
Dua Yong Rew  

some new information

I suspect using MqlRates or ArrayMaximum / ArrayMinimum will cause a huge slow down in the strategy tester.

Is there alternative for ArrayMaximum / ArrayMinimum? 

Alain Verleyen
Moderator
32442
Alain Verleyen  
doshur:

some new information

I suspect using MqlRates or ArrayMaximum / ArrayMinimum will cause a huge slow down in the strategy tester.

Is there alternative for ArrayMaximum / ArrayMinimum? 

Show the code where you are using ArrayMaximum / ArrayMinimum, so we can see if there is an alternative.
Dua Yong Rew
5481
Dua Yong Rew  
angevoyageur:
Show the code where you are using ArrayMaximum / ArrayMinimum, so we can see if there is an alternative.
   double   Bar_Close[];

   ArraySetAsSeries(Bar_Close, true);

   if(CopyClose(Symbol(), 0, 0, HL_Prd, Bar_Close) <= 0) return;

   Bar_Close[ArrayMinimum(Bar_Close, 0, HL_Prd)]

this is the sample code

once i start to insert calling arraymaximum or arrayminimum then the testing slows down alot 

Alain Verleyen
Moderator
32442
Alain Verleyen  
doshur:

this is the sample code

once i start to insert calling arraymaximum or arrayminimum then the testing slows down alot 

What is the value of HL_Prd ? Are you executing this on each tick ?
12
To add comments, please log in or register