Issue #107: Added function PositionCloseAll

This commit is contained in:
vdemydiuk
2018-06-06 14:24:39 +03:00
parent 897892dc89
commit 0c38d37559
6 changed files with 47 additions and 5 deletions
+9
View File
@@ -521,11 +521,20 @@ namespace MtApi5
///<summary>
///Close all open positions.
///</summary>
[Obsolete("OrderCloseAll is deprecated, please use PositionCloseAll instead.")]
public bool OrderCloseAll()
{
return SendCommand<bool>(Mt5CommandType.OrderCloseAll, null);
}
///<summary>
///Close all open positions. Returns count of closed positions.
///</summary>
public int PositionCloseAll()
{
return SendCommand<int>(Mt5CommandType.PositionCloseAll, null);
}
///<summary>
///Closes a position with the specified ticket.
///</summary>