Very Slow BackTest

 

Hi everyone!!!
What can cause a backtest to be very slow on One EA and faster on The Other???

I test the two different EA with the same conditions, 2 months period and visual mode OFF .
One EA took 5 Minutes to complete the test but the other took 3 hours

I would like to know what causes a very slow backtest 

Kind regards

 
More complicated algorithms?
 
Keith Watford:
More complicated algorithms?

Thanks for your reply.

Not really because It uses 5 indicators and It is breakout EA. The size of the file is 104Kb and It is very slow to complete backtest
The other one, use 1 indicator and price action and the size of the file 204Kb

 
Ugochukwu Mobi: Not really because It …

You have no idea; you are just guessing. Without seeing the code we are just guessing.

  1. EAs : Don't do per tick that you can do per bar, or on open.
    If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts and you recalculate.)
    If you are waiting for an order to open or close, only look when OrdersTotal (or MT5 equivalent) has changed.
              How to get backtesting faster ? - MT4 - MQL4 programming forum

  2. Indicators: Code it properly so it only recomputes bar zero (after the initial run.)
              How to do your lookbacks correctly.
    Or, reduce Tools → Options (control+O) → Charts → Max bars in chart to something reasonable (like 1K.)

 
William Roeder #:

You have no idea; you are just guessing. Without seeing the code we are just guessing.

Hi William, I´m facing same problem, but the reason looks to be in other place:

I have same EA which is coded to work with several assest. It´s tester works great with EUR/GBP and any other Forex, but takes hours with brazilian assests WIN$N and WDO@N. 

I tested on different computers, created custom symbol and tried other continous series (@). Nevertheless, it take hours to run backteast...

Is it possible to have an incompatibility with brazilian continuous series? Cause I also tried continuous US Futures (MEZ@ and MNN@) and it works like a charm.

Thanks for your help!

 
Pridoale9 #:

Hi William, I´m facing same problem, but the reason looks to be in other place:

I have same EA which is coded to work with several assest. It´s tester works great with EUR/GBP and any other Forex, but takes hours with brazilian assests WIN$N and WDO@N. 

I tested on different computers, created custom symbol and tried other continous series (@). Nevertheless, it take hours to run backteast...

Is it possible to have an incompatibility with brazilian continuous series? Cause I also tried continuous US Futures (MEZ@ and MNN@) and it works like a charm.

Thanks for your help!

Of course it's possible. Most EA are not coded to work equally on Forex and Futures (or Stocks).

Fix your code.

 
Alain Verleyen #:

Of course it's possible. Most EA are not coded to work equally on Forex and Futures (or Stocks).

Fix your code.

Thanks for your reply Alain!

It is important to mention that I already use this EA to trade these brazilian stocks (WIN/WDO) and I didn´t get any visual problem over the last months. My EA performs very well indeed, with sharp and fast trades. This issues is evident only when I run Tester.

However, doesn´t matter what I do, I don´t find the cause and my poor knowledge tells me every moment to ask for help...

Therefore, I kindly ask you if you have any hint I should start from to fix this issue. If so, I do appreciate for your help!

 
Pridoale9 #:

Thanks for your reply Alain!

It is important to mention that I already use this EA to trade these brazilian stocks (WIN/WDO) and I didn´t get any visual problem over the last months. My EA performs very well indeed, with sharp and fast trades. This issues is evident only when I run Tester.

However, doesn´t matter what I do, I don´t find the cause and my poor knowledge tells me every moment to ask for help...

Therefore, I kindly ask you if you have any hint I should start from to fix this issue. If so, I do appreciate for your help!

All is possible, but without any technical details it's impossible to help. Not sure what you are expecting from me, I am not a magician :-D
 

Thanks Alain for your kind and deep contribution...

Did anyone else experience such kind of issue and could share with us?

Thanks a lot!

Reason: