Python API bug: order_send result comment is incorrect

 

Hi all,


I couldn't find an appropriate channel for bug report so I'm posting it here. Maybe the community can confirm this as a bug and hopefully someone could forward this thread to the developers.

The issue I'm facing is with the OrderSendResult structure returned after an order_send() request using the Python API. One of the fields returned is the "comment", which should contain broker's comment to operation. However, this field is returning the same comment that was passed to the request, and not the broker return, as it should.


To reproduce the bug do the following:

1. Create a request that will generate a comment as a result. Fill the request "comment" with a dummy commentary.

2. Send the request using the order_send() command from the Python API.

3. On the OrderSendResult object returned, check the "comment" field.


The "comment" field will have the same comment passed, when it should have the comment returned by the broker, which can be checked in the Journal tab of the MT5 Terminal.


Can someone confirm this? Is there any workaround to get the broker's comment?



Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Trade Request Structure - Data Structures - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5