Forum

PYTHON:unable to close a position

Been trying to close a position i opened with the same code but the closing code keeps returning NONE. Kere is the code: #opening metarader on pc mt.initialize() #send a buy oder buy = {'action':mt. TRADE_ACTION_DEAL , 'symbol':'EURUSD', 'volume':0.01, 'type':mt.ORDER_TYPE_BUY

difficulties closing an order

I been sending the following request to close a position but it the print_statement keeps returning NONE. what can i do please. if pos.ticket == ticket: request ={ 'action':mt. TRADE_ACTION_DEAL , 'position':ticket, 'type':0, 'price':tick.ask

Could anyone help please?

IT KEFT RETURNING "UNSUPPORTED FILLING MODE" AS I TRIED TO MAKE A SIMPLE BUY ORDER VIA PYTHON SCRIPT. WHY IS THAT? CAN ANYONE HELP PLEASE