Download MetaTrader 5

How to close a position when symbol is "close only"

To add comments, please log in or register
Format text in the messages editor. It is convenient!
Frederic Metraux
511
Frederic Metraux 2016.07.20 14:21 

I went into this problem recently.

I use Trade.PositionClose from the library to close a position. Looking at its code, it uses TRADE_ACTION_CLOSE_BY, which means it is closing by opening a trade in the opposite direction.

Problem is that on a pair, trade is disabled. Info says that this symbol is "close only". I could close the position manually but using Trade.PositionClose didn't work. Error was "trade is disabled".

Thanks for your help.

To add comments, please log in or register