"for position in positions" is Python code, does that work in mql also now?
josip2247: I would like to close all pending orders in same time. i tried with open positions and succeeded but dont now how to do with open pending orders. this is my code for open positions:
You don't close Orders, you remove them with the "TRADE_ACTION_REMOVE" action.
You also have to get them from the Orders and not the Positions, using orders_get, from the total orders available with orders_total.
EDIT: Please note that the links I have provided are for Python code integration, given that your code sample is in Python.
Thank you!
Hello,
I would like to close all pending orders in same time.
i tried with open positions and succeeded but dont now how to do with open pending orders.
this is my code for open positions: