mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-18 05:08:11 +00:00
Added PositionClose command to MT5 Api
This commit is contained in:
@@ -475,6 +475,17 @@ namespace MtApi5
|
||||
{
|
||||
return sendCommand<bool>(Mt5CommandType.OrderCloseAll, null);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///Closes a position with the specified ticket.
|
||||
///</summary>
|
||||
///<param name="ticket">Ticket of the closed position.</param>
|
||||
public bool PositionClose(int ticket)
|
||||
{
|
||||
var commandParameters = new ArrayList { ticket};
|
||||
|
||||
return sendCommand<bool>(Mt5CommandType.PositionClose, commandParameters);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Account Information functions
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace MtApi5
|
||||
MarketBookAdd = 60,
|
||||
MarketBookRelease = 61,
|
||||
MarketBookGet = 62,
|
||||
OrderCloseAll = 63
|
||||
OrderCloseAll = 63,
|
||||
PositionClose = 64
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user