Download MetaTrader 5
To add comments, please log in or register
Find out how to install MetaTrader on Linux
TheWho
9
TheWho 2016.01.16 18:28 

Hello,

How should I implement immediate position close in MLQ5?

The only way to close something that I found is SendOrder with request action TRADE_ACTION_REMOVE. But removed pending orders, and not active position. 

 Thanks 

Dua Yong Rew
5203
Dua Yong Rew 2016.01.17 02:27  
If its a buy position, do a sell with same volume and vice versa
Atsushi Yamanaka
5372
Atsushi Yamanaka 2016.01.29 02:57  
#include <Trade\Trade.mqh>
CTrade            m_trade;

m_trade.PositionClose(Symbol());
 
little1hu
8
little1hu 2016.02.03 13:57  

Hi.

I good like close only  which are open whith specific magicnumber.

/
To add comments, please log in or register