MetaTrader 5 Python User Group - how to use Python in Metatrader - page 89

 
@yuddy7 #: Hello, how can I connect and open trade positions with the Deriv broker API using python ? I have read their documentation and it's not beginner friendly. 

Ask them! It has nothing to do with this website.

 
Mircea Vlad Albu #:
hello,

as far as I know  python order_send() method is using MT5 equivalent of OrderSend()

I am building an async adapter for the mt5 library and I would like my python order_send to use the  MT5 - OrderSendAsync()  instead of OrderSend ()

Is this possible with the current functionality available ?
Hi, you found an answer to this or a solution? Thanks
 
bao tang #:

stackoverflow: https://stackoverflow.com/questions/72081988/how-do-i-get-the-result-of-a-trade-in-mt5-with-python-using-the-ticket-number

I have the same issue here, even though the function "history_deals_get" accepts the argument "ticket=", it keeps return error (-2, 'Terminal: Invalid params'). I guess this function is buggy with argument "ticket", so the developer team denies it.

Hope developer team can see the discussion. Still no workaround after 1 year.

Thx


Dear developers,

There is a bug with function history_deals_get(ticket=order_ticket). Providing order ticket would not work, but providing deal ticket would work. This behaviour is different from the documentation, and in practice getting historical deals by providing order ticket would be more practical.

Can you please fix it?

Thank you,

Documentation on MQL5: Python Integration / history_deals_get
Documentation on MQL5: Python Integration / history_deals_get
  • www.mql5.com
Get deals from trading history within the specified interval with the ability to filter by ticket or position. Call specifying a time interval...
Reason: