MT5和速度在行动 - 页 68

 
pivomoe:

29GB磁盘。测试是在家用机上进行的,我知道你是在VPS 或虚拟机上进行的。

这就是固态硬盘的分区方式。最后一个(Z:)是MT5测试器的RAM盘。

 

我的睡眠(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.s 我的电脑似乎比你的更弱。

你的。

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
 
你的操作系统是什么?可能是一些用于ATM的LTSC版本?
 
fxsaber:

我邀请其他人分享在他们机器上运行这个脚本 的结果。

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

完全没有负载的计算机,所有后台进程都停止了,一个终端运行着一个没有指标的图表。


弱势的VPS。

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:

并非总是如此,也并非处处都是十分之一毫秒的时间。用一个简单的脚本进行了检查

以下是我的日志

OnTick用户总是看到最新鲜的蜱虫。

OnBookEvent的用户总是看到最新鲜的蜱虫。

但如果你想比较OnTick 接收的ticks OnBookEvent 接收的ticks,那么你就会失望了,因为这些事件 是按顺序处理的,而不是并行处理的。用户pivomoe试图告诉你什么

处理程序是串联处理的?这从根本上说是错误的!
所有的处理程序都应该平行运行!
关于mt5中所有东西都是异步的说法又在哪里呢?

请对此发表评论!

SymbolInfoTick() 以阻塞模式还是非阻塞模式执行的吗?

例如,它位于while循环的主体中,没有连接或市场周末关闭,
,它将通过停止循环而被阻止,还是将被异步执行?


 
pivomoe:
你的操作系统是什么?可能是一些用于ATM的LTSC版本?

我不知道该去哪里找。


 
fxsaber:

我邀请其他人分享在他们机器上运行这个脚本 的结果。

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

FX-8350

 

测试睡眠

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

都在同一硬件上,终端构建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

在一个薄弱的VPS上

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)
 

脚本

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

同一台机器上的顾问

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:

处理程序是按顺序执行的?这从根本上说是错误的!

你如何想象它--在一个线程中进行并行处理?