MT5 and speed in action - page 67

 
fxsaber:

The problem is very simply formulated: how to write an EA that won't slow down when waiting for a queue? An infinite loop is impossible, because Sleep is a brake. And asynchronous mode will not work at all. Now catching waits in the form of long milliseconds is not the point at all.

In your case - change your computer to a more powerful one. And then you can stop using Sleep
 
Anton:

Don't deceive yourself and others.

All your statements here describe a completely different task: how to write an EA that won't slow down on a 9 year old hardware which is overloaded to its limits.

This thread and your participation, in particular, helped me write such an EA. CPU load is up to 10% on a very weak VPS when I have more than a dozen Expert Advisors running. One click for hundreds of positions and pending orders. CopyTicks on every tick and so on. So your restatement is wrong.


I need to create an EA on a strong machine with Idle-CPU that won't wait in queue for long milliseconds. Unfortunately, you have not run a test EA on your MuscleCar.

 
Slava:
In your case - you may need to change your computer to a more powerful one. Then you won't have to use Sleep.

Please give us a Benchmark figure to look at to determine if the power of the car is sufficient or not.


Please ask all owners of powerful iron to share the result of this advisor on their machine. You should wait a minute or two after starting it.

 
fxsaber:

That is why I am asking a question to MQ-Demo owners.

In that case, this question will go unanswered. This is a demo server.

Once again: in the terminal you get the most "recent" prices for each symbol.

The terminal is not in the business of setting or modifying tick times - as it came, so it is given. The terminal has no task to synchronize tick times of different symbols.

So, your assumption that the terminal "slows down" and sends old ticks to the Expert Advisor based on the test you have provided is false.

At this point I will consider the question closed. Your training is not the primary task of developers.

 

In my opinion it is better to test on a slow machine. It will show problems that would otherwise go unnoticed on a fast machine.

I will run the test later today and post the results.

 
Anton:

In that case, this question will remain unanswered. This is a demo server.

Once again: in the terminal you get the most "up-to-date" prices for each symbol.

The terminal is not in the business of setting or modifying tick times - as it came, so it is given. The terminal doesn't have the task to synchronize tick times for different symbols.

Your demo exists for technical working out. If I switch to another server, you will send me to the broker. Why does your server generate the tick stream in such a way that it sends old ticks? If the problem is not in the terminal, it is in the server part. In this case, the server belongs to MQ. So any broker has nothing to do with it.

So, your assumption, based on the test you have provided, that the Terminal "slows down" and sends the EA old ticks is false.

At this point I will consider the question closed. Your training is not the primary task of developers.

Your speculation about my assumption is wrong. No need to read between the lines.


And to the point. The real situation on your server (and others). The last incoming tick in Market Watch has time 00:00:00.150, later a tick comes with time 00:00:00.148. When it was received in Terminal, how long has it been alive?

 
fxsaber:

Please provide a Benchmark to guide you in determining if your machine is powerful enough or not.


Please ask all owners of powerful hardware to share the results of this advisor on their machine. You should wait a minute or two after starting it.

2020.11.04 19:55:49.461	test1 (EURUSD,H1)	Alert: OnBook-lag! - 1002 mcs.
2020.11.04 19:55:49.461	test1 (EURUSD,H1)	      [bid]   [ask] [onTick] [Interval]
2020.11.04 19:55:49.461	test1 (EURUSD,H1)	[0] 1.17269 1.17269     true     494478
2020.11.04 19:55:49.461	test1 (EURUSD,H1)	[1] 1.17269 1.17269    false        297
2020.11.04 19:55:49.461	test1 (EURUSD,H1)	[2] 1.17272 1.17272     true     117109
2020.11.04 19:55:49.461	test1 (EURUSD,H1)	[3] 1.17272 1.17272    false       1002
2020.11.04 19:55:59.922	test1 (EURUSD,H1)	Alert: OnTick-lag! - 2673766 mcs.
2020.11.04 19:55:59.923	test1 (EURUSD,H1)	      [bid]   [ask] [onTick] [Interval]
2020.11.04 19:55:59.923	test1 (EURUSD,H1)	[0] 1.17266 1.17266    false        252
2020.11.04 19:55:59.923	test1 (EURUSD,H1)	[1] 1.17264 1.17264     true      35875
2020.11.04 19:55:59.923	test1 (EURUSD,H1)	[2] 1.17264 1.17264    false        247
2020.11.04 19:55:59.923	test1 (EURUSD,H1)	[3] 1.17264 1.17264     true    2673766
2020.11.04 19:56:00.202	test1 (EURUSD,H1)	Alert: OnTick-lag! - 6478 mcs.
2020.11.04 19:56:00.202	test1 (EURUSD,H1)	      [bid]   [ask] [onTick] [Interval]
2020.11.04 19:56:00.202	test1 (EURUSD,H1)	[0] 1.17258 1.17258     true      86315
2020.11.04 19:56:00.202	test1 (EURUSD,H1)	[1] 1.17258 1.17258    false        265
2020.11.04 19:56:00.202	test1 (EURUSD,H1)	[2] 1.17260 1.17260    false      42446
2020.11.04 19:56:00.202	test1 (EURUSD,H1)	[3] 1.17260 1.17260     true       6478
...
2020.11.04 19:57:45.465	test1 (EURUSD,H1)	Alert: OnTick-lag! - 15596 mcs.
2020.11.04 19:57:45.465	test1 (EURUSD,H1)	      [bid]   [ask] [onTick] [Interval]
2020.11.04 19:57:45.465	test1 (EURUSD,H1)	[0] 1.17292 1.17293     true     107565
2020.11.04 19:57:45.465	test1 (EURUSD,H1)	[1] 1.17292 1.17293    false        275
2020.11.04 19:57:45.465	test1 (EURUSD,H1)	[2] 1.17293 1.17293    false     219947
2020.11.04 19:57:45.465	test1 (EURUSD,H1)	[3] 1.17293 1.17293     true      15596
2020.11.04 19:58:00.002	test1 (EURUSD,H1)	Alert: OnTick-lag! - 15784 mcs.
2020.11.04 19:58:00.002	test1 (EURUSD,H1)	      [bid]   [ask] [onTick] [Interval]
2020.11.04 19:58:00.002	test1 (EURUSD,H1)	[0] 1.17294 1.17294     true      29494
2020.11.04 19:58:00.002	test1 (EURUSD,H1)	[1] 1.17294 1.17294    false        283
2020.11.04 19:58:00.002	test1 (EURUSD,H1)	[2] 1.17296 1.17296    false     549238
2020.11.04 19:58:00.002	test1 (EURUSD,H1)	[3] 1.17296 1.17296     true      15784
2020.11.04 19:58:01.859	test1 (EURUSD,H1)	Alert: OnTick-lag! - 4075 mcs.
2020.11.04 19:58:01.859	test1 (EURUSD,H1)	      [bid]   [ask] [onTick] [Interval]
2020.11.04 19:58:01.859	test1 (EURUSD,H1)	[0] 1.17297 1.17297     true      21386
2020.11.04 19:58:01.859	test1 (EURUSD,H1)	[1] 1.17297 1.17297    false        325
2020.11.04 19:58:01.859	test1 (EURUSD,H1)	[2] 1.17296 1.17296    false      97215
2020.11.04 19:58:01.859	test1 (EURUSD,H1)	[3] 1.17296 1.17296     true       4075

2020.11.04 12:18:51.145 Terminal        Windows 10 build 19041, AMD Ryzen 5 1600 Six-Core Processor, 12 / 15 Gb memory, 140 / 446 Gb disk, IE 11, UAC, GMT+3
The hardware seems to be more or less powerful...
 



2020.11 . 04  17 : 55 : 08.418 Terminal MetaTrader 5 x64 build 2560 started for MetaQuotes Software Corp. 
2020.11 . 04  17 : 55 : 08.420 Terminal the the the the Windows 10 build 18362 , Intel Core i5- 7400      @ 3.00 GHz, 22 / 31 Gb memory, 29 / 222 Gb disk, IE 11 , UAC, GMT + 1


Midiocre hardware with no load.


Но если Вы хотите сравнить тики, полученный в OnTick и полученный в OnBookEvent, тогда вас ждёт разочарование, так как  Theprocessing of eventsis sequential, not parallel. What user pivomoe tried to tell you
I believe this will always be an issue because of the consistent nature of it.
However, it seems worth keeping an eye on both the news and the news if you want to get the latest news as soon as possible.
Files:
_20201104.log  199 kb
 
fxsaber:

I invite others to share the result of running this script on their machine.

2020.11.04 18:33:01.220 TextCreate (EURUSD,H1)  total 18018475 microseconds (1.802 ms per iteration)
 
fxsaber:

Your script.


Machine.

Windows 10 build 19042, Intel Core i7-2700 K  @ 3.50 GHz, 7 / 15 Gb memory, 18 / 29 Gb disk

29gb disk. You are getting tests from home machines and I understand you are either from a VPS or a virtual machine.

Виртуальный хостинг для MetaTrader 5
Виртуальный хостинг для MetaTrader 5
  • www.mql5.com
Виртуальный хостинг для MetaTrader 4/5 является лучшим VPS-решением для Форекса. Оно не требует настройки, дает минимальные задержки до сервера и отличается низкими ценами. Всего за 15 USD в месяц вы получите виртуальную платформу, которая работает круглые сутки, экономит вашу прибыль и даже окупает себя. Создать удаленную копию приложения...