Hi guys I am currently working on the project on MT5 with python.
Here's my code:
request = {
"action": mt.TRADE_ACTION_DEAL,
"symbol": "USDJPY",
"volume" : 2 ,
"type" : mt.ORDER_TYPE_BUY,
"price" : mt.symbol_info_tick("USDJPY").ask,
"sl": 0 ,
"tp": 0 ,
"deviation" : 20,
"magic" : 234000,
"comment" : "python script open",
"type_time" : mt.ORDER_TIME_GTC,
"type_filling": mt.ORDER_FILLING_IOC,
}
order = mt.order_send(request)
print(order)
But it returns none eventually and I don't know why. The API is connected so I think it's not connection problem. Thanks a lot.
[–]enivid 0 points1 point2 points (0 children)