MT5 y la velocidad en acción - página 68

 
pivomoe:

Disco de 29gb. Las pruebas son desde máquinas caseras y entiendo que son desde un VPS o una máquina virtual.

Así es como se particionan los SSD. El último (Z:) es el disco RAM para el probador MT5.

 

Mi prueba del sueño(1)

Windows 10 build 17134, Intel Core i7-2600  @ 3.40 GHz, 7 / 15 Gb memory, 97 / 195 Gb disk, IE 11, UAC, GMT+3
TestSleep (PLD-12.20,M1)        total 19979585 microseconds (1.998 ms per iteration)

p.d. Parece que tengo un ordenador aún más débil que el tuyo.

La tuya:

2020.11.04 16:47:52.962 Terminal        Windows 10 build 19042, Intel Core i7-2700 K  @ 3.50 GHz, 7 / 15 Gb memory, 18 / 29 Gb disk, IE 11, Admin, GMT+2
 
¿Cuál es su sistema operativo? ¿Probablemente alguna versión de LTSC para cajeros automáticos?
 
fxsaber:

Invito a otros a compartir el resultado de la ejecución de este script en su máquina.

2020.11.04 21:28:02.430 Terminal        MetaTrader 5 x64 build 2669 started for MetaQuotes Software Corp.
2020.11.04 21:28:02.430 Terminal        Windows 7 Service Pack 1 build 7601, Intel Core i7-2670 QM  @ 2.20 GHz, 5 / 7 Gb memory, 40 / 119 Gb disk, IE 11, UAC, GMT+3
2020.11.04 21:42:01.171 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1535 mcs.
2020.11.04 21:42:01.171 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:01.171 test fxsaber lags (EURUSD,M1)   [0] 1.17176 1.17183     true    1913026
2020.11.04 21:42:01.171 test fxsaber lags (EURUSD,M1)   [1] 1.17176 1.17183    false        838
2020.11.04 21:42:01.171 test fxsaber lags (EURUSD,M1)   [2] 1.17177 1.17184     true     285603
2020.11.04 21:42:01.171 test fxsaber lags (EURUSD,M1)   [3] 1.17177 1.17184    false       1535
2020.11.04 21:42:01.513 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1601 mcs.
2020.11.04 21:42:01.513 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:01.513 test fxsaber lags (EURUSD,M1)   [0] 1.17177 1.17184     true     285603
2020.11.04 21:42:01.513 test fxsaber lags (EURUSD,M1)   [1] 1.17177 1.17184    false       1535
2020.11.04 21:42:01.513 test fxsaber lags (EURUSD,M1)   [2] 1.17178 1.17185     true     339894
2020.11.04 21:42:01.513 test fxsaber lags (EURUSD,M1)   [3] 1.17178 1.17185    false       1601
2020.11.04 21:42:02.173 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1542 mcs.
2020.11.04 21:42:02.173 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:02.173 test fxsaber lags (EURUSD,M1)   [0] 1.17178 1.17185     true     339894
2020.11.04 21:42:02.173 test fxsaber lags (EURUSD,M1)   [1] 1.17178 1.17185    false       1601
2020.11.04 21:42:02.173 test fxsaber lags (EURUSD,M1)   [2] 1.17177 1.17185     true     658901
2020.11.04 21:42:02.173 test fxsaber lags (EURUSD,M1)   [3] 1.17177 1.17185    false       1542
2020.11.04 21:42:02.786 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1611 mcs.
2020.11.04 21:42:02.786 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:02.786 test fxsaber lags (EURUSD,M1)   [0] 1.17177 1.17184     true     309509
2020.11.04 21:42:02.787 test fxsaber lags (EURUSD,M1)   [1] 1.17177 1.17184    false        935
2020.11.04 21:42:02.787 test fxsaber lags (EURUSD,M1)   [2] 1.17177 1.17185     true     301094
2020.11.04 21:42:02.787 test fxsaber lags (EURUSD,M1)   [3] 1.17177 1.17185    false       1611
2020.11.04 21:42:07.702 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1541 mcs.
2020.11.04 21:42:07.702 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:07.702 test fxsaber lags (EURUSD,M1)   [0] 1.17177 1.17185     true     409488
2020.11.04 21:42:07.702 test fxsaber lags (EURUSD,M1)   [1] 1.17177 1.17185    false        847
2020.11.04 21:42:07.702 test fxsaber lags (EURUSD,M1)   [2] 1.17178 1.17185     true    3609403
2020.11.04 21:42:07.702 test fxsaber lags (EURUSD,M1)   [3] 1.17178 1.17185    false       1541
2020.11.04 21:42:08.620 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1559 mcs.
2020.11.04 21:42:08.620 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:08.620 test fxsaber lags (EURUSD,M1)   [0] 1.17177 1.17184     true     306847
2020.11.04 21:42:08.620 test fxsaber lags (EURUSD,M1)   [1] 1.17177 1.17184    false        829
2020.11.04 21:42:08.620 test fxsaber lags (EURUSD,M1)   [2] 1.17178 1.17185     true     315408
2020.11.04 21:42:08.620 test fxsaber lags (EURUSD,M1)   [3] 1.17178 1.17185    false       1559
2020.11.04 21:42:12.018 test fxsaber lags (EURUSD,M1)   Alert: OnTick-lag! - 906601 mcs.
2020.11.04 21:42:12.018 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:12.018 test fxsaber lags (EURUSD,M1)   [0] 1.17174 1.17179    false        809
2020.11.04 21:42:12.018 test fxsaber lags (EURUSD,M1)   [1] 1.17173 1.17180     true     592027
2020.11.04 21:42:12.018 test fxsaber lags (EURUSD,M1)   [2] 1.17173 1.17180    false        769
2020.11.04 21:42:12.018 test fxsaber lags (EURUSD,M1)   [3] 1.17173 1.17180     true     906601
2020.11.04 21:42:12.834 test fxsaber lags (EURUSD,M1)   Alert: OnTick-lag! - 6976 mcs.
2020.11.04 21:42:12.834 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:12.834 test fxsaber lags (EURUSD,M1)   [0] 1.17173 1.17180    false        769
2020.11.04 21:42:12.834 test fxsaber lags (EURUSD,M1)   [1] 1.17173 1.17180     true     906601
2020.11.04 21:42:12.834 test fxsaber lags (EURUSD,M1)   [2] 1.17174 1.17181    false     808595
2020.11.04 21:42:12.834 test fxsaber lags (EURUSD,M1)   [3] 1.17174 1.17181     true       6976
2020.11.04 21:42:16.340 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1323 mcs.
2020.11.04 21:42:16.340 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 21:42:16.340 test fxsaber lags (EURUSD,M1)   [0] 1.17168 1.17175     true     104187
2020.11.04 21:42:16.340 test fxsaber lags (EURUSD,M1)   [1] 1.17168 1.17175    false        566
2020.11.04 21:42:16.340 test fxsaber lags (EURUSD,M1)   [2] 1.17167 1.17175     true     292558
2020.11.04 21:42:16.340 test fxsaber lags (EURUSD,M1)   [3] 1.17167 1.17175    false       1323

Ordenador totalmente descargado, todos los procesos de fondo parados, un terminal funcionando con un gráfico sin indicadores.


VPS débil:

MetaTrader 5 x64 build 2650
2020.11.04 21:55:15.582 Terminal        Windows Server 2012 R2 build 9600, QEMU Virtual  version (cpu64-rhel6), 0 / 0 Gb memory, 3 / 19 Gb disk, IE 11, RDP, UAC, Admin, GMT+3
2020.11.04 22:05:32.637 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 3002 mcs.
2020.11.04 22:05:32.637 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 22:05:32.637 test fxsaber lags (EURUSD,M1)   [0] 1.17164 1.17170    false    2215173
2020.11.04 22:05:32.637 test fxsaber lags (EURUSD,M1)   [1] 1.17164 1.17170     true         16
2020.11.04 22:05:32.637 test fxsaber lags (EURUSD,M1)   [2] 1.17165 1.17173     true     505195
2020.11.04 22:05:32.637 test fxsaber lags (EURUSD,M1)   [3] 1.17165 1.17173    false       3002
2020.11.04 22:05:39.546 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 6365 mcs.
2020.11.04 22:05:39.546 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 22:05:39.546 test fxsaber lags (EURUSD,M1)   [0] 1.17169 1.17174     true    1622392
2020.11.04 22:05:39.546 test fxsaber lags (EURUSD,M1)   [1] 1.17169 1.17174    false        736
2020.11.04 22:05:39.546 test fxsaber lags (EURUSD,M1)   [2] 1.17169 1.17175     true     275705
2020.11.04 22:05:39.546 test fxsaber lags (EURUSD,M1)   [3] 1.17169 1.17175    false       6365
2020.11.04 22:05:41.953 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 6172 mcs.
2020.11.04 22:05:41.953 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 22:05:41.953 test fxsaber lags (EURUSD,M1)   [0] 1.17165 1.17172    false     317312
2020.11.04 22:05:41.953 test fxsaber lags (EURUSD,M1)   [1] 1.17165 1.17172     true         15
2020.11.04 22:05:41.953 test fxsaber lags (EURUSD,M1)   [2] 1.17164 1.17172     true     680826
2020.11.04 22:05:41.953 test fxsaber lags (EURUSD,M1)   [3] 1.17164 1.17172    false       6172
2020.11.04 22:05:45.359 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 6254 mcs.
2020.11.04 22:05:45.359 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 22:05:45.359 test fxsaber lags (EURUSD,M1)   [0] 1.17163 1.17170    false    3112999
2020.11.04 22:05:45.359 test fxsaber lags (EURUSD,M1)   [1] 1.17163 1.17170     true        104
2020.11.04 22:05:45.359 test fxsaber lags (EURUSD,M1)   [2] 1.17164 1.17170     true     285972
2020.11.04 22:05:45.359 test fxsaber lags (EURUSD,M1)   [3] 1.17164 1.17170    false       6254
2020.11.04 22:06:01.032 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 1104 mcs.
2020.11.04 22:06:01.033 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 22:06:01.033 test fxsaber lags (EURUSD,M1)   [0] 1.17163 1.17170     true     376698
2020.11.04 22:06:01.033 test fxsaber lags (EURUSD,M1)   [1] 1.17163 1.17170    false         43
2020.11.04 22:06:01.033 test fxsaber lags (EURUSD,M1)   [2] 1.17165 1.17171     true     324610
2020.11.04 22:06:01.033 test fxsaber lags (EURUSD,M1)   [3] 1.17165 1.17171    false       1104
2020.11.04 22:06:04.826 test fxsaber lags (EURUSD,M1)   Alert: OnBook-lag! - 6866 mcs.
2020.11.04 22:06:04.826 test fxsaber lags (EURUSD,M1)         [bid]   [ask] [onTick] [Interval]
2020.11.04 22:06:04.826 test fxsaber lags (EURUSD,M1)   [0] 1.17166 1.17173    false     910870
2020.11.04 22:06:04.826 test fxsaber lags (EURUSD,M1)   [1] 1.17166 1.17173     true         17
2020.11.04 22:06:04.826 test fxsaber lags (EURUSD,M1)   [2] 1.17168 1.17174     true     265755
2020.11.04 22:06:04.826 test fxsaber lags (EURUSD,M1)   [3] 1.17168 1.17174    false       6866
 
Slava:

No siempre y no en todas partes una décima de milisegundo. Comprobado con un simple script

Aquí está mi registro

Los usuarios de OnTick siempre ven la garrapata más reciente.

Los usuarios de OnBookEvent siempre ven el tick más reciente.

Pero si quieres comparar los ticks recibidos con OnTick y los recibidos con OnBookEvent te vas a llevar un chasco porque los eventos se procesan secuencialmente y no en paralelo. Lo que el usuario pivomoe trató de decirle

¿Los manipuladores se manejan en serie? Esto es fundamentalmente erróneo.
Todos los manipuladores deben funcionar en paralelo.
¿Y dónde está esa afirmación de que todo es asíncrono en mt5?

Por favor, comenten esto.

SymbolInfoTick() se ejecuta en modo de bloqueo o no?

Por ejemplo, se encuentra en el cuerpo del bucle while y no hay conexión o el mercado está cerrado por fin de semana,
se bloqueará deteniendo el bucle o se ejecutará de forma asíncrona?


 
pivomoe:
¿Cuál es su sistema operativo? ¿Probablemente alguna versión de LTSC para cajeros automáticos?

No sé dónde buscar.


 
fxsaber:

Invito a otros a compartir el resultado de la ejecución de este script en su máquina.

2020.11.04 22:46:21.383 TestSleep (BR-11.20,M15)        total 10001544 microseconds (1.000 ms per iteration)

FX-8350

 

TestSleep:

2020.11.04 22:58:12.246 test1 (EURUSD,H1)       total 155486725 microseconds (15.549 ms per iteration)

Todo en el mismo hardware, terminal build 2650

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

En un VPS débil

2020.11.04 23:17:10.795 Terminal        Windows Server 2012 R2 build 9600 on KVM, Intel Xeon  E5-2630 v4 @ 2.20 GHz, 1 / 1 Gb memory, 46 / 59 Gb disk, IE 11, RDP, UAC, Admin, GMT+3
2020.11.04 23:22:13.630 test1 (GBPUSD,M1)       total 164085014 microseconds (16.409 ms per iteration)
 

Guión

2020.11.04 22:58:09.400 fxsaberTest (USDSGD,M1) total 10335638 microseconds (1.034 ms per iteration)

2020.11.04 22:55:36.860 Terminal        MetaTrader 5 x64 build 2660 started for MetaQuotes Software Corp.
2020.11.04 22:55:36.914 Terminal        Windows 7 Service Pack 1 build 7601, Intel Core i3-3220  @ 3.30 GHz, 1 / 7 Gb memory, 40 / 298 Gb disk, IE 11, UAC, GMT+3

Asesor en la misma máquina

2020.11.04 23:11:49.269 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 9278 mcs.
2020.11.04 23:11:49.269 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:11:49.269 fxsaberTest1 (USDSGD,M1)        [0] 1.35782 1.35829     true     798967
2020.11.04 23:11:49.269 fxsaberTest1 (USDSGD,M1)        [1] 1.35782 1.35829    false         10
2020.11.04 23:11:49.269 fxsaberTest1 (USDSGD,M1)        [2] 1.35784 1.35828     true    1002847
2020.11.04 23:11:49.269 fxsaberTest1 (USDSGD,M1)        [3] 1.35784 1.35828    false       9278
2020.11.04 23:11:51.759 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 1138 mcs.
2020.11.04 23:11:51.759 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:11:51.759 fxsaberTest1 (USDSGD,M1)        [0] 1.35785 1.35831     true     995884
2020.11.04 23:11:51.759 fxsaberTest1 (USDSGD,M1)        [1] 1.35785 1.35831    false         19
2020.11.04 23:11:51.759 fxsaberTest1 (USDSGD,M1)        [2] 1.35784 1.35830     true    1494938
2020.11.04 23:11:51.759 fxsaberTest1 (USDSGD,M1)        [3] 1.35784 1.35830    false       1138
2020.11.04 23:11:54.274 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 1725 mcs.
2020.11.04 23:11:54.274 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:11:54.274 fxsaberTest1 (USDSGD,M1)        [0] 1.35784 1.35830     true    1494938
2020.11.04 23:11:54.274 fxsaberTest1 (USDSGD,M1)        [1] 1.35784 1.35830    false       1138
2020.11.04 23:11:54.274 fxsaberTest1 (USDSGD,M1)        [2] 1.35784 1.35831     true    2513478
2020.11.04 23:11:54.274 fxsaberTest1 (USDSGD,M1)        [3] 1.35784 1.35831    false       1725
2020.11.04 23:12:24.780 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 8871 mcs.
2020.11.04 23:12:24.781 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:12:24.781 fxsaberTest1 (USDSGD,M1)        [0] 1.35780 1.35826    false    1393401
2020.11.04 23:12:24.781 fxsaberTest1 (USDSGD,M1)        [1] 1.35780 1.35826     true          3
2020.11.04 23:12:24.781 fxsaberTest1 (USDSGD,M1)        [2] 1.35780 1.35827     true    2911594
2020.11.04 23:12:24.781 fxsaberTest1 (USDSGD,M1)        [3] 1.35780 1.35827    false       8871
2020.11.04 23:12:26.676 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 8739 mcs.
2020.11.04 23:12:26.676 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:12:26.676 fxsaberTest1 (USDSGD,M1)        [0] 1.35780 1.35828     true     793665
2020.11.04 23:12:26.676 fxsaberTest1 (USDSGD,M1)        [1] 1.35780 1.35828    false        232
2020.11.04 23:12:26.676 fxsaberTest1 (USDSGD,M1)        [2] 1.35785 1.35828     true    1100758
2020.11.04 23:12:26.676 fxsaberTest1 (USDSGD,M1)        [3] 1.35785 1.35828    false       8739
2020.11.04 23:12:32.486 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 1073 mcs.
2020.11.04 23:12:32.486 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:12:32.486 fxsaberTest1 (USDSGD,M1)        [0] 1.35778 1.35828     true     882728
2020.11.04 23:12:32.486 fxsaberTest1 (USDSGD,M1)        [1] 1.35778 1.35828    false        229
2020.11.04 23:12:32.486 fxsaberTest1 (USDSGD,M1)        [2] 1.35777 1.35828     true    1003699
2020.11.04 23:12:32.486 fxsaberTest1 (USDSGD,M1)        [3] 1.35777 1.35828    false       1073
2020.11.04 23:12:35.094 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 1070 mcs.
2020.11.04 23:12:35.094 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:12:35.094 fxsaberTest1 (USDSGD,M1)        [0] 1.35775 1.35826     true    1595418
2020.11.04 23:12:35.094 fxsaberTest1 (USDSGD,M1)        [1] 1.35775 1.35826    false         22
2020.11.04 23:12:35.094 fxsaberTest1 (USDSGD,M1)        [2] 1.35775 1.35827     true    1010723
2020.11.04 23:12:35.094 fxsaberTest1 (USDSGD,M1)        [3] 1.35775 1.35827    false       1070
2020.11.04 23:12:40.507 fxsaberTest1 (USDSGD,M1)        Alert: OnBook-lag! - 1001 mcs.
2020.11.04 23:12:40.507 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:12:40.507 fxsaberTest1 (USDSGD,M1)        [0] 1.35772 1.35823     true    2806395
2020.11.04 23:12:40.507 fxsaberTest1 (USDSGD,M1)        [1] 1.35772 1.35823    false        260
2020.11.04 23:12:40.507 fxsaberTest1 (USDSGD,M1)        [2] 1.35772 1.35824     true     997459
2020.11.04 23:12:40.507 fxsaberTest1 (USDSGD,M1)        [3] 1.35772 1.35824    false       1001
2020.11.04 23:12:43.479 fxsaberTest1 (USDSGD,M1)        Alert: OnTick-lag! - 66461 mcs.
2020.11.04 23:12:43.479 fxsaberTest1 (USDSGD,M1)              [bid]   [ask] [onTick] [Interval]
2020.11.04 23:12:43.479 fxsaberTest1 (USDSGD,M1)        [0] 1.35776 1.35824     true    1099872
2020.11.04 23:12:43.479 fxsaberTest1 (USDSGD,M1)        [1] 1.35776 1.35824    false        467
2020.11.04 23:12:43.479 fxsaberTest1 (USDSGD,M1)        [2] 1.35776 1.35825    false    1805312
2020.11.04 23:12:43.479 fxsaberTest1 (USDSGD,M1)        [3] 1.35776 1.35825     true      66461
 
Roman:

Los manipuladores se ejecutan secuencialmente... ¡Esto es fundamentalmente erróneo!

¿Cómo lo imaginas? ¿Procesamiento paralelo en un solo hilo?