I am using python connected to MT5, and have manage to load pending order with sl, tp, etc. I am now having problem expiring the pending order after 30 min, maybe, how do I put it in the request section? I have tried mt5.ORDER_TIME_SPECIFIED_DAY but nothing happen, though I prefer a much shorter time countdown. I have done it with *.mq5, but unsuccessful with python. Please help!!!
request = {
'action': mt5.TRADE_ACTION_PENDING,
'symbol': sym,
'volume': LotSize,
'type': signal,
'price': P_price,
'sl': P_SL,
'tp': P_TP,
'comment': '',
'expiration': mt5.ORDER_TIME_SPECIFIED_DAY,
'type_filling': mt5.ORDER_FILLING_RETURN,
}
mt5.order_send(request)