I'm not sure about this, but you can change this
I'm not sure about this, but you can change this for
closing buy position
request.action=TRADE_ACTION_DEAL; request.type= ORDER_TYPE_SELL;
closing sell position
request.action=TRADE_ACTION_DEAL; request.type= ORDER_TYPE_BUY;
I'm not sure about this, but you can change this for
closing buy position
closing sell position
This it's for placed order no?
For close my order i need write : TRADE_ACTION_MODIFY?
In the doc it's not write how use MqlTradeRequest for close Order
- www.mql5.com
It's working
For close Buy => Use Sell
For close Sell => Use Buy
But how can i have two positions for the same Symbol?
example 1 volume Buy and 2 volume sell?
But how can i have two positions for the same Symbol?
example 1 volume Buy and 2 volume sell?
Hello,
I'm facing the same problem and tried to do as you said, open a sell to close a buy and vice versa but didn't work. I keep just opening new positions instead of closing the old ones. Any idea what might be happening?
Hello,
I'm facing the same problem and tried to do as you said, open a sell to close a buy and vice versa but didn't work. I keep just opening new positions instead of closing the old ones. Any idea what might be happening?
You are using an hedge account, while the technique described here is for a netting account.
For an hedge account you always need to specify the ticket of the position you want to close.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I place a trade with MqlTradeRequest structure and i want close my trade (Order = 123456 example)
When i write it :
my order is not close ?
do you know why
thank a lot
Benjamin