Topic: How Fast is an Expert Adviser

I was wandering how fast is the calculation of EA in MT and decided to check it by myself.

I made it calculating a strategy 1000 times on every tick including data copying and indicator calculations. The strategy has 5 indicators and uses 1000 bars.

   long startTick = GetTickCount();
   int tries = 1000;
 
   for(int i=0;i<tries;i++)
      actionsTrade.OnTick(__ticks);
   
   long endTick = GetTickCount();
   long timePassed = endTick - startTick;
   Print("Performance [mlsec] ",IntegerToString(timePassed), " for ", IntegerToString(tries), " calcs.");

Results:

http://s11.postimg.org/nkdw9xwsz/screenshot_928.png


And this is fast: 205 milliseconds for 1000 calculations  or 0.0002 sec per calculation. Not bad for a 7000 lines EA.

Re: How Fast is an Expert Adviser

The same expert, but this this time it uses 10 000 bars for indicators calculation.

http://s11.postimg.org/skbchw2fn/screenshot_929.png

1.35 milliseconds for a calculation

It appears that even with 10000 bars the experts are reliable enough for live trading.

3 (edited by hannahis 2015-05-31 16:16:51)

Re: How Fast is an Expert Adviser

Hi Popov, thanks for adding the Bar calculation in the new updates.

As previously, I input my maximum bars for my EA at 5000.

Now with the auto calculation features, it's very assuring to know that most of my EA are within the array range.

I realized most of my EA need about 500 to 800, with a few exceptional ones that goes up to 133,000!!! and was automatically removed.

Questions:

1. Since I set my EA previously at 5000 for maximum bars, can I just leave it as it is without making any changes?  Does it mean my EA which only need 500 Bars would then have to use up 5000 bars for calculation and hence slow down the execution process? 

2.  Some of EAs that were out of array were automatically removed.  Yet some of these EA were profitable previously before the update.  Can you remove the auto delete features so that I can still have the choice of running these profitable EA?

Based on your calculation on how fast the MT calculates EA (in split of mil sec).  Can I just leave it at 5000 cos I've so many EA with 10 terminals and hundreds of EA running.  It is very tedious to make the changes and I'm hoping to spare myself from this need to re-input the maximum Bar issue.

Re: How Fast is an Expert Adviser

Hi Popov,

Suggestions

1.  Since the FSB added in the auto calculation of the maximum bar, can you make it automatically included in the EA export to MT4, i.e. we don't have to input the maximum bar value.  Otherwise, I have some many EAs and I have to look at each EA in the MT4 "expert tab" to see what's the bar value and then go to the EA properties and change each and everyone of them.

2.  At the same time, can you allow manual input, i.e. has the ability to revert back to previous update features whereby I can still choose to run some of my EA.  Because with this new features, there were some of my profitable EA that can't be run because it is now automatically removed from the MT4.

Re: How Fast is an Expert Adviser

with a few exceptional ones that goes up to 133,000!!! and was automatically removed.

Can you send me this strategy. There is something wrong there?

Otherwise, I have some many EAs and I have to look at each EA in the MT4 "expert tab" to see what's the bar value and then go to the EA properties and change each and everyone of them.

There is no Bars count option in the EA properties any more. Do you see such option in your expert? Probably the experts code was not successfully updated in some reason.


Because with this new features, there were some of my profitable EA that can't be run because it is now automatically removed from the MT4.

We have to fix the issue instead of going back. Can you send me these experts. I'll be able to fix the issue and publish an update for several hours.