mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-27 18:47:55 +00:00
Issue #57: Added function PositionSelectByTicket into C# code
This commit is contained in:
@@ -114,5 +114,7 @@ namespace MtApi5
|
||||
|
||||
//Requests
|
||||
MtRequest = 155,
|
||||
|
||||
PositionSelectByTicket = 69
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user