MQL5 Python - Good Till Date Format


Hi Guys,

First post here! I am writing an EA using the MT5 Python library. I am writing it directly in my python editor (PyCharm).

So far, I was able to connect to MT5 and able to send orders as long as they are "ORDER_TIME_GTC". However I wanted to try out "ORDER_TIME_SPECIFIED", and I tried to supply the expiry date/time in various formats and I keep getting an error saying "Invalid expiration".

What's the correct expiration datetime format that I need in Python so that MT5 can accept the order?

Thanks in advance!

Documentation on MQL5: Integration / MetaTrader for Python
Documentation on MQL5: Integration / MetaTrader for Python
MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5


Are you sure your broker would support that particular method? Been having same challenge but for volume filling policy 



I am using " ORDER_FILLING_IOC".. Thats working fine.