mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-13 02:38:07 +00:00
Issue #107: Added function PositionCloseAll
This commit is contained in:
@@ -250,6 +250,7 @@ namespace MtApi5
|
||||
GlobalVariablesDeleteAll = 157,
|
||||
GlobalVariablesTotal = 158,
|
||||
|
||||
UnlockTicks = 159
|
||||
UnlockTicks = 159,
|
||||
PositionCloseAll = 160
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user