Well, at least this problem is no more in the last MT4 build that is still hidden (not official). I just tried it and it works well, so I'm pretty happy that the well known MT4 is going to the garbage.
MetaQuotes, why not get rid of MT5 as well? Isn't it so obvious that it will never ever beat MT4, even when MT4 have some very annoying problems!
15 millions in 156 ms = 15.000 in 156 microsec = 15 in 156 nanosec
not so slow
and is well known MT5 is designed to run faster than MT4, 3 times in the 1st test and 20 the 2nd
3 and 20 dont look so big to me
I used 15 million cycles because I calculated that 1 year have about 15 million ticks. And these results are for a single empty function (the fastest function call), so yes, it does not look so slow from that point of view, but if you have many functions or the EA needs to be optimized those nanoseconds can easily turn into minutes, hours, days and months :) For no reason really :)
I always had this opinion that MT4 is very slow on backtesting and because of that making of EA is slow and tricky, but hopefully with the new builds it will be better.
wow a 2000% performance increase is huge
Yes that is going to make a huge difference for optimization times, I had not realized this difference in performance between mt4 and mt5. I skimmed through that other thread where you and 2cent were comparing overloaded functions vs a regular function with a switch, it looks like you are way ahead of me in coding with the new mql4 I got some catching up to do lol
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Here is the very simple code that I used to benchmark how fast is MT4 when working with EA functions:
And here is the analog code for MT5:
MT4 results:
test1: 156 ms
test2: 1279 ms
MT5 results:
test1: 46 ms
test2: 63 ms
It is even worse when in MT4 you have something inside the function, so this is really the best that I can get from a function call.
I tried this on many MT4 installations, on another fresh Windows with fresh MT4 and on older version of MT4 - there is no difference.
I will ask the support why is that, but if anyone knows something about this issue or how to fix it, I will be great.