Acceptance of SL/TP orders - page 5

 
Renat Fatkhullin:

You "forgot" a very small detail - you checked 58,000 orders and found only one ejection at 300 ms. And this (1 out of 58 000) should clearly have been the focus of such checks.

Yes, I did not collect the status more objectively.

Anyway, we will continue to analyze it, though single outliers can always occur in any system.

I looked at RannForex in great detail since it is a battle one. There absolutely every order has 2-3 ms, irrespective of the symbol.

And the status on ticks was collected in another place where the terminal was located on the same machine where the server is.

 
2021.02.05 17:00:47.044 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.044 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.044 CheckOrders (EURUSD,D1) Start CheckOrders, inFrom = 2021.01.01 00:00:00, inTicket = 0
2021.02.05 17:00:47.044 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.045 CheckOrders (EURUSD,D1) Last Tick 2021.02.05 15:34:01.326 1.08224 1.08233
2021.02.05 17:00:47.045 CheckOrders (EURUSD,D1) LatTick Length = 5 ms.
2021.02.05 17:00:47.045 CheckOrders (EURUSD,D1) Accepted Tick 2021.02.05 15:34:01.326 1.08224 1.08233
2021.02.05 17:00:47.045 CheckOrders (EURUSD,D1) Accepted Length = 5 ms.
2021.02.05 17:00:47.045 CheckOrders (EURUSD,D1) Order 123333339 ORDER_TYPE_BUY EURCHF 2021.02.05 15:34:01.331 1.08233 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.05 15:34:01.373, Position 123263232 created 2021.02.05 13:10:32.521, StopLevel = 0
2021.02.05 17:00:47.045 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) Last Tick 2021.02.04 21:44:22.384 1.08132 1.08136
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) LatTick Length = 6 ms.
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) Accepted Tick 2021.02.04 21:44:22.384 1.08132 1.08136
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) Accepted Length = 6 ms.
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) Order 123050627 ORDER_TYPE_SELL EURCHF 2021.02.04 21:44:22.390 1.08132 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.04 21:44:22.431, Position 123024385 created 2021.02.04 20:52:15.142, StopLevel = 0
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) Last Tick 2021.02.04 17:22:02.377 1.08189 1.08189
2021.02.05 17:00:47.046 CheckOrders (EURUSD,D1) LatTick Length = 7 ms.
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Accepted Tick 2021.02.04 17:22:02.377 1.08189 1.08189
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Accepted Length = 7 ms.
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122938233 ORDER_TYPE_SELL EURCHF 2021.02.04 17:22:02.384 1.08189 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.04 17:22:02.442, Position 122928144 created 2021.02.04 17:16:43.333, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Last Tick 2021.02.04 17:16:42.786 1.08168 1.08168
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) LatTick Length = 51 ms.
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Accepted Tick 2021.02.04 17:16:42.786 1.08168 1.08168
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Accepted Length = 51 ms.
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122933325 ORDER_TYPE_BUY EURCHF 2021.02.04 17:16:42.837 1.08171 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.04 17:16:43.335, Position 122905671 created 2021.02.04 17:09:03.783, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 11:38:04.424, 2021.02.03 12:38:04.424) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122248978 ORDER_TYPE_SELL NZDCAD 2021.02.03 12:38:04.424 0.92108 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 12:38:04.469, Position 122078077 created 2021.02.03 08:49:03.466, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 11:37:56.905, 2021.02.03 12:37:56.905) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122248934 ORDER_TYPE_SELL NZDCAD 2021.02.03 12:37:56.905 0.92104 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 12:37:56.953, Position 122077808 created 2021.02.03 08:47:33.346, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 07:47:33.344, 2021.02.03 09:24:40.310) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122149815 ORDER_TYPE_SELL NZDCAD 2021.02.03 09:24:40.310 0.92254 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 09:24:40.355, Position 122077761 created 2021.02.03 08:47:33.344, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 07:46:05.065, 2021.02.03 09:24:38.641) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122149805 ORDER_TYPE_SELL NZDCAD 2021.02.03 09:24:38.641 0.92252 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 09:24:38.680, Position 122077760 created 2021.02.03 08:46:05.065, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 07:49:03.438, 2021.02.03 08:49:03.438) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122139945 ORDER_TYPE_BUY NZDCAD 2021.02.03 08:49:03.438 0.92213 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 08:49:03.482, Position 122071277 created 2021.02.03 02:39:05.643, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 07:47:33.323, 2021.02.03 08:47:33.323) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122139669 ORDER_TYPE_BUY NZDCAD 2021.02.03 08:47:33.323 0.92218 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 08:47:33.376, Position 122071588 created 2021.02.03 02:38:27.630, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 07:47:33.323, 2021.02.03 08:47:33.323) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122139668 ORDER_TYPE_BUY NZDCAD 2021.02.03 08:47:33.323 0.92219 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 08:47:33.367, Position 122070905 created 2021.02.03 02:38:45.648, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 07:46:05.018, 2021.02.03 08:46:05.018) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122139354 ORDER_TYPE_BUY NZDCAD 2021.02.03 08:46:05.018 0.92227 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 08:46:05.068, Position 122070794 created 2021.02.03 02:38:27.343, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:58:12.164, 2021.02.03 02:39:05.594) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122078065 ORDER_TYPE_SELL NZDCAD 2021.02.03 02:39:05.594 0.92066 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 02:39:05.631, Position 122005391 created 2021.02.03 01:58:12.164, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:55:04.419, 2021.02.03 02:38:45.600) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122077803 ORDER_TYPE_SELL NZDCAD 2021.02.03 02:38:45.600 0.92056 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 02:38:45.631, Position 122016550 created 2021.02.03 01:55:04.419, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:59:34.647, 2021.02.03 02:38:27.594) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122077754 ORDER_TYPE_SELL NZDCAD 2021.02.03 02:38:27.594 0.92048 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 02:38:27.648, Position 122016553 created 2021.02.03 01:59:34.647, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:54:36.785, 2021.02.03 02:38:27.292) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122077748 ORDER_TYPE_SELL NZDCAD 2021.02.03 02:38:27.292 0.92042 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 02:38:27.344, Position 122004723 created 2021.02.03 01:54:36.785, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:59:34.603, 2021.02.03 01:59:34.603) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122071584 ORDER_TYPE_BUY NZDCAD 2021.02.03 01:59:34.603 0.91993 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 01:59:34.623, Position 121900746 created 2021.02.02 21:33:29.598, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:58:12.125, 2021.02.03 01:58:12.125) = 0, _LastError = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) Order 122071259 ORDER_TYPE_BUY NZDCAD 2021.02.03 01:58:12.125 0.92016 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 01:58:12.165, Position 121910314 created 2021.02.02 20:42:24.207, StopLevel = 0
2021.02.05 17:00:47.047 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:55:04.388, 2021.02.03 01:55:04.388) = 0, _LastError = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Order 122070902 ORDER_TYPE_BUY NZDCAD 2021.02.03 01:55:04.388 0.92053 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 01:55:04.411, Position 121945533 created 2021.02.02 21:33:29.593, StopLevel = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.03 00:54:36.744, 2021.02.03 01:54:36.744) = 0, _LastError = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Order 122070780 ORDER_TYPE_BUY NZDCAD 2021.02.03 01:54:36.744 0.92064 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.03 01:54:36.791, Position 121900844 created 2021.02.02 20:39:22.457, StopLevel = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.02 20:33:29.555, 2021.02.02 21:33:29.555) = 0, _LastError = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Order 122016544 ORDER_TYPE_SELL NZDCAD 2021.02.02 21:33:29.555 0.91619 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.02 21:33:29.591, Position 121849527 created 2021.02.02 18:01:22.267, StopLevel = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.02 20:33:29.555, 2021.02.02 21:33:29.555) = 0, _LastError = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Order 122016543 ORDER_TYPE_SELL NZDCAD 2021.02.02 21:33:29.555 0.91619 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.02 21:33:29.585, Position 121804705 created 2021.02.02 16:52:35.900, StopLevel = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.02 19:42:24.179, 2021.02.02 20:42:24.179) = 0, _LastError = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Order 122005386 ORDER_TYPE_SELL NZDCAD 2021.02.02 20:42:24.179 0.91665 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.02 20:42:24.232, Position 121804706 created 2021.02.02 17:01:15.335, StopLevel = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) 
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Alert: bool GetAcceptedTick(const ulong,MqlTick&,const bool): CopyTicksRange(NZDCAD, 2021.02.02 19:39:22.423, 2021.02.02 20:39:22.423) = 0, _LastError = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) Order 122004709 ORDER_TYPE_SELL NZDCAD 2021.02.02 20:39:22.423 0.91662 ORDER_REASON_TP ORDER_STATE_FILLED 2021.02.02 20:39:22.476, Position 121829876 created 2021.02.02 16:52:39.474, StopLevel = 0
2021.02.05 17:00:47.048 CheckOrders (EURUSD,D1) 
2021.02.05 17:01:08.998 CheckOrders (EURUSD,D1) Last Tick 2021.01.07 16:31:09.714 1.06933 1.06938
2021.02.05 17:01:08.998 CheckOrders (EURUSD,D1) LatTick Length = 133 ms.
2021.02.05 17:01:08.998 CheckOrders (EURUSD,D1) Accepted Tick 2021.01.07 16:31:09.581 1.06936 1.06941
2021.02.05 17:01:08.998 CheckOrders (EURUSD,D1) Accepted Length = 266 ms.
2021.02.05 17:01:08.998 CheckOrders (EURUSD,D1) Order 115585098 ORDER_TYPE_SELL AUDNZD 2021.01.07 16:31:09.847 1.06936 ORDER_REASON_TP ORDER_STATE_FILLED 2021.01.07 16:31:09.907, Position 115540426 created 2021.01.07 16:24:36.081, StopLevel = 0
2021.02.05 17:01:08.998 CheckOrders (EURUSD,D1) 
2021.02.05 17:01:10.935 CheckOrders (EURUSD,D1) Total Orders (from 2021.01.01 00:00:00) = 1343, calculated = 583
2021.02.05 17:01:10.935 CheckOrders (EURUSD,D1) Calculation time = 00:00:23.890, Performance = 24.0 orders/sec.
2021.02.05 17:01:10.935 CheckOrders (EURUSD,D1) 
2021.02.05 17:01:10.935 CheckOrders (EURUSD,D1) ServerName: ICMarkets-MT5
2021.02.05 17:01:10.935 CheckOrders (EURUSD,D1) 
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Last Tick 2021.01.07 16:31:09.714 1.06933 1.06938
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) LatTick Length = 133 ms.
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Accepted Tick 2021.01.07 16:31:09.581 1.06936 1.06941
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Accepted Length = 266 ms.
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Order 115585098 ORDER_TYPE_SELL AUDNZD 2021.01.07 16:31:09.847 1.06936 ORDER_REASON_TP ORDER_STATE_FILLED 2021.01.07 16:31:09.907, Position 115540426 created 2021.01.07 16:24:36.081, StopLevel = 0
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) 
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Orders (2) before 115585098 with PositionID = 115540426:
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) ------------------------
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Checked Orders = 0
 

Forum on trading, automated trading systems and testing trading strategies

Acceptance of SL/TP orders

Dzmitry Manannikov, 2021.02.05 15:10

2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Last Tick 2021.01.07 16:31:09.714 1.06933 1.06938
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) LatTick Length = 133 ms.
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Accepted Tick 2021.01.07 16:31:09.581 1.06936 1.06941
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Accepted Length = 266 ms.
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Order 115585098 ORDER_TYPE_SELL AUDNZD 2021.01.07 16:31:09.847 1.06936 ORDER_REASON_TP ORDER_STATE_FILLED 2021.01.07 16:31:09.907, Position 115540426 created 2021.01.07 16:24:36.081, StopLevel = 0
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) 
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Orders (2) before 115585098 with PositionID = 115540426:
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) ------------------------
2021.02.05 17:01:10.950 CheckOrders (EURUSD,D1) Checked Orders = 0

Thanks, I will explain the highlighted. A TP order was accepted 266 ms after the price started satisfying it. At the same time the last tick before acceptance was in 133ms.

This is incomprehensible, so on a simpler example.


A tick comes in that should accept the TP of an open position. MT5 creates a TP order, one or more in sequence (if previous ones are cancelled).

But we can say exactly about the last order in this sequence. It was not formed as soon as the last tick meeting the TP level came, but only after 133 ms.


Imagine, a tick comes. And the MT5-Server only starts after 133 ms! Renat will say that this is the peak value and he will be right. That's why I gave a script in the branch, which gives the average value of lag.

It is also a few milliseconds.


SZY The acceptance of an order is simply the fact of its creation. It's not sending it somewhere, but simply creating it on the MT5-Server. It should happen instantly as soon as the price reaches the appropriate level.

 

In a combat situation I have encountered that sometimes MT4 accepts limiters faster than MT5. As a result in these situations MT4 has time to grab liquidity, MT5 does not.

Please overcome the lags of the MT5 server.

 
The situation has not improved.
 

Forum on trading, automated trading systems and testing trading strategies

Acceptance of SL/TP orders

fxsaber, 2020.11.27 21:20

Seems to have figured out the reason. Running the script on the server machine.

// Преобразование времени в миллисекундах в строку.
string TimeToString( const long time, const int FlagTime = TIME_DATE | TIME_SECONDS)
{
  return(TimeToString((datetime)time / 1000, FlagTime) + "." + IntegerToString(time % 1000, 3, '0'));
}

// Преобразование тика в строку.
string TickToString( const MqlTick &Tick, const int digits )
{
  return(TimeToString(Tick.time_msc) + " " + DoubleToString(Tick.bid, digits) + " " + DoubleToString(Tick.ask, digits));
}

void OnTick()
{
  MqlTick Tick;
  
  if (SymbolInfoTick(_Symbol, Tick))
    Print(TickToString(Tick, _Digits));
}


Result.

2020.11.27 22:13:44.156 2020.11.27 22:13:44.149 1.59953 1.59993
2020.11.27 22:13:44.862 2020.11.27 22:13:44.855 0.98789 0.98837
2020.11.27 22:13:45.263 2020.11.27 22:13:45.258 0.98789 0.98839
2020.11.27 22:13:46.878 2020.11.27 22:13:46.873 10.15554 10.16084
2020.11.27 22:13:48.993 2020.11.27 22:13:48.991 10.15554 10.16106
2020.11.27 22:13:51.722 2020.11.27 22:13:51.716 0.98789 0.98840
2020.11.27 22:13:53.035 2020.11.27 22:13:53.027 1.59950 1.59995
2020.11.27 22:13:53.134 2020.11.27 22:13:53.128 1.59954 1.59995
2020.11.27 22:13:53.737 2020.11.27 22:13:53.734 0.98789 0.98839
2020.11.27 22:13:54.745 2020.11.27 22:13:54.743 0.98789 0.98840
2020.11.27 22:13:56.768 2020.11.27 22:13:56.761 0.98789 0.98839
2020.11.27 22:13:57.977 2020.11.27 22:13:57.973 1.59954 1.59994
2020.11.27 22:14:00.293 2020.11.27 22:14:00.292 10.15554 10.16093
2020.11.27 22:14:04.131 2020.11.27 22:14:04.125 1.59954 1.59995
2020.11.27 22:14:08.868 2020.11.27 22:14:08.866 0.98789 0.98841
2020.11.27 22:14:09.780 2020.11.27 22:14:09.773 0.98789 0.98840
2020.11.27 22:14:09.981 2020.11.27 22:14:09.975 1.59955 1.59994
2020.11.27 22:14:10.085 2020.11.27 22:14:10.076 1.59957 1.59994
2020.11.27 22:14:10.180 2020.11.27 22:14:10.177 1.59957 1.59995

On the left is the print time. On the right is the time of the incoming tick. The lag can be clearly seen. It appears that OnTick is triggered a few milliseconds later than the tick is written to the trade server.


It seems that the server part that is responsible for order activation has received ticks with delay as it happens with their arrival to terminal.


Terminal/Server = 2920. Unfortunately, the situation has not changed yet.

2021.05.19 12:39:02.082 Test9   2021.05.19 12:39:02.080 1.62642 1.62654
2021.05.19 12:39:02.284 Test9   2021.05.19 12:39:02.282 1.62641 1.62651
2021.05.19 12:39:04.305 Test9   2021.05.19 12:39:04.299 1.62645 1.62655
2021.05.19 12:39:06.823 Test9   2021.05.19 12:39:06.821 1.62647 1.62658
2021.05.19 12:39:13.791 Test9   2021.05.19 12:39:13.785 1.62647 1.62659
2021.05.19 12:39:13.891 Test9   2021.05.19 12:39:13.886 1.62649 1.62659
2021.05.19 12:39:15.103 Test9   2021.05.19 12:39:15.097 1.62651 1.62661
2021.05.19 12:39:18.534 Test9   2021.05.19 12:39:18.527 1.62653 1.62663
2021.05.19 12:39:19.238 Test9   2021.05.19 12:39:19.232 1.62650 1.62660
 

Checked the orders (several thousand) that the broker accepted on the b2940 trade server.

Significant improvement! The lags are up to 2 ms, but these are probably spikes not spoiling the overall new picture.

Definitely trading with MT5 is more profitable now, as orders are execute few milliseconds earlier and there is almost no lag.


I have not checked the other lags.

 

OrderGetTicket list saw them). When these orders disappeared, they were not in the order history. They did not appear in the order history at all.

I checked this by hand - it is absent. I have contacted the broker. The broker has checked the server and they (the tickets) are not in the history or the logs.

The broker reports that if the orders are sorted by ticket, there are holes in these places - the tickets jump over these values.


MT5-Server b2940. An alarming bug. I recommend brokers to check order tickets for holes - there is no clear sequential numbering of tickets.


ZZY These orders are not in the Terminal logs because they were TP orders - they are created automatically when the price reaches the TP level of the open position.

ZZZY What actions to take to help get rid of the problem?

Библиотеки: TradesID
Библиотеки: TradesID
  • 2021.03.29
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Библиотеки: TradesID
 
fxsaber:

OrderGetTicket list saw them). When these orders disappeared, they were not in the order history. They did not appear in the order history at all.

I checked this by hand - it is absent. I have contacted the broker. The broker has checked the server and neither they (the ticket reports) are in the history or in the logs.

The broker reports that if the orders are sorted by ticket, there are holes in these places - the tickets jump over these values.


MT5-Server b2940. An alarming bug. I recommend brokers to check order tickets for holes - there is no clear sequential numbering of tickets.


ZZY These orders are not in the Terminal logs because they were TP orders - they are created automatically when the price reaches the TP level of the open position.

ZZZY What should I do to help to get rid of this problem?

Pirs, plugins, add-ons, scripts, server filters are certainly not the issue...

I understand that everyone is overheated, but somehow childish...bug reports look different

 
Maxim Kuznetsov:

Pirs, plugins, add-ons, scripts, server filters are certainly not involved...

I understand that everyone is overheated, but it's a bit childish... the bug reports look different

You see an order in terminal, then it disappears. Then it doesn't appear on the server - the ticket is dropped. Please don't get involved.