Bug in MT5 build 3104: OnTradeTransaction is not invoked after an async trade is placed, in case broker returns Trade disabled error

 

Steps to reproduce:

1. Take an MT5 account for which broker have disabled the trading

2. Place an async trade via EA

Actual results:

1. Terminal prints Trade disabled error in the logs, as expected

2. OnTradeTransaction never invoked on this error, so that EA hangs/times out waiting for a trade result to arrive.

Expected result:

1. OnTradeTransaction is invoked on this error, presenting the valid result code to EA.


Where should I report this issue to?

 
Perform corresponding checks before sending an order - https://www.mql5.com/en/docs/runtime/tradepermission
Documentation on MQL5: MQL5 programs / Trade Permission
Documentation on MQL5: MQL5 programs / Trade Permission
  • www.mql5.com
Trade Permission - MQL5 programs - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Since there was no transaction, I would assume, it won't get called....

Why do you assume it gets called?
Reason: