Issue #57: Added function PositionSelectByTicket into C# code

This commit is contained in:
DW
2017-08-29 17:40:23 +03:00
parent a33d4a4594
commit 9800177b08
2 changed files with 13 additions and 0 deletions
+2
View File
@@ -114,5 +114,7 @@ namespace MtApi5
//Requests
MtRequest = 155,
PositionSelectByTicket = 69
}
}
+11
View File
@@ -223,6 +223,17 @@ namespace MtApi5
return SendCommand<bool>(Mt5CommandType.PositionSelect, commandParameters);
}
///<summary>
///Selects an open position to work with based on the ticket number specified in the position. If successful, returns true. Returns false if the function failed.
///</summary>
///<param name="ticket">Position ticket.</param>
public bool PositionSelectByTicket(ulong ticket)
{
var commandParameters = new ArrayList { ticket };
return SendCommand<bool>(Mt5CommandType.PositionSelectByTicket, commandParameters);
}
///<summary>
///The function returns the requested property of an open position, pre-selected using PositionGetSymbol or PositionSelect.
///</summary>