mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-15 19:58:10 +00:00
Issue #57: Added function PositionSelectByTicket into C# code
This commit is contained in:
@@ -114,5 +114,7 @@ namespace MtApi5
|
|||||||
|
|
||||||
//Requests
|
//Requests
|
||||||
MtRequest = 155,
|
MtRequest = 155,
|
||||||
|
|
||||||
|
PositionSelectByTicket = 69
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,6 +223,17 @@ namespace MtApi5
|
|||||||
return SendCommand<bool>(Mt5CommandType.PositionSelect, commandParameters);
|
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>
|
///<summary>
|
||||||
///The function returns the requested property of an open position, pre-selected using PositionGetSymbol or PositionSelect.
|
///The function returns the requested property of an open position, pre-selected using PositionGetSymbol or PositionSelect.
|
||||||
///</summary>
|
///</summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user