Pending Order Activated but Status not Updated in Terminal

 

I'm am experiencing a problem with the update of the status or orders in terminal (and hence in my EA). An extract of the Journal follows for clarity:

 

2019.05.03 11:30:22.814 '1123079866': modify pending order #93112412 buy limit 0.20 DE.30.. at 12408.0 sl: 12368.0 tp: 12458.0 -> price: 12408.6 sl: 12368.6 tp: 12458.6
2019.05.03 11:30:22.970 '1123079866': order #93112412 buy limit 0.20 DE.30.. at 12408.6 activated at price 12408.6
2019.05.03 11:30:22.970 '1123079866': pending order #93112412 buy limit 0.20 DE.30.. was modified -> price: 12408.6 sl: 12368.6 tp: 12458.6
2019.05.03 11:30:22.970 '1123079866': modify pending order #93112412 buy limit 0.20 DE.30.. at 12408.6 sl: 12368.6 tp: 12458.6 -> price: 12407.4 sl: 12367.4 tp: 12457.4
2019.05.03 11:30:23.127 '1123079866': modification of pending order #93112412 buy limit 0.20 DE.30.. at 12408.6 sl: 12368.6 tp: 12458.6 -> price: 12407.4 sl: 12367.4 tp: 12457.4 failed [Trade is disabled]
2019.05.03 11:30:24.455 '1123079866': modify pending order #93112412 buy limit 0.20 DE.30.. at 12408.6 sl: 12368.6 tp: 12458.6 -> price: 12407.4 sl: 12367.4 tp: 12457.4
2019.05.03 11:30:24.627 '1123079866': modification of pending order #93112412 buy limit 0.20 DE.30.. at 12408.6 sl: 12368.6 tp: 12458.6 -> price: 12407.4 sl: 12367.4 tp: 12457.4 failed [Trade is disabled]


It can be seen that at 2019.05.03 11:30:22.970 the order was activated. However, my EA, which looks at OrderType() to determine whether a pending order has been activated or not, determined that the order (in this case order #93112412) was still of the type OP_BUYLIMIT (value = 2). Therefore, as could be seen in the extract of the Journal above, my EA continued to attempt to modify the apparent pending order even though it was in fact already activated. The apparent "Pending Status" of this order could also be confirmed in the Terminal Window where  order #93112412 was shown as still Pending! Restarting / re-loading the EA did not help as the order type was still incorrectly shown in the MT4 Terminal window.

The only solution I could find to this problem so far was to completely shutdown and restart MetaTrader after which my EA was successfully able to re-load all orders and the correct status of order (i.e. type OP_BUY, value = 0) was identified. After the MT4 restart this order was also shown correctly as an activated order and no longer as a pending order in the terminal window.

I know this problem has been encountered before (refer to the following link):

https://www.mql5.com/en/forum/221757

But I couldn't find a suitable solution that is applicable to my case. 

Can anyone who has had this problem and has found a solution, other than restarting MT4, let me know how they dealt with it please? For, example, is there a way to force synchronization of the order status shown in the terminal with the server, from my EA, without having to restart MT4?

MT4 fails to sync executed pending Orders during fast moving market and recognizes it a pending order that cant be deleted
MT4 fails to sync executed pending Orders during fast moving market and recognizes it a pending order that cant be deleted
  • 2017.12.05
  • www.mql5.com
MT4 fails to sync executed pending Orders during fast moving market and recognizes it a pending order that cant be deleted...
Reason: