diff --git a/MtApi5/Mt5CommandType.cs b/MtApi5/Mt5CommandType.cs index 3b468ebc..8a8aab49 100755 --- a/MtApi5/Mt5CommandType.cs +++ b/MtApi5/Mt5CommandType.cs @@ -114,5 +114,7 @@ namespace MtApi5 //Requests MtRequest = 155, + + PositionSelectByTicket = 69 } } diff --git a/MtApi5/MtApi5Client.cs b/MtApi5/MtApi5Client.cs index 8352c369..33bf084b 100755 --- a/MtApi5/MtApi5Client.cs +++ b/MtApi5/MtApi5Client.cs @@ -223,6 +223,17 @@ namespace MtApi5 return SendCommand(Mt5CommandType.PositionSelect, commandParameters); } + /// + ///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. + /// + ///Position ticket. + public bool PositionSelectByTicket(ulong ticket) + { + var commandParameters = new ArrayList { ticket }; + + return SendCommand(Mt5CommandType.PositionSelectByTicket, commandParameters); + } + /// ///The function returns the requested property of an open position, pre-selected using PositionGetSymbol or PositionSelect. ///