mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-16 20:28:09 +00:00
Issue #96: Implemented function PositionGetTicket in MtApi (MT5)
This commit is contained in:
@@ -9,7 +9,6 @@ namespace MtApi5
|
||||
//OrderSend = 1,
|
||||
OrderCalcMargin = 2,
|
||||
OrderCalcProfit = 3,
|
||||
//OrderCheck = 4,
|
||||
//OrderSendAsync = 5,
|
||||
PositionsTotal = 6,
|
||||
PositionGetSymbol = 7,
|
||||
@@ -17,6 +16,7 @@ namespace MtApi5
|
||||
PositionGetDouble = 9,
|
||||
PositionGetInteger = 10,
|
||||
PositionGetString = 11,
|
||||
PositionGetTicket = 4,
|
||||
OrdersTotal = 12,
|
||||
OrderGetTicket = 13,
|
||||
OrderSelect = 14,
|
||||
|
||||
@@ -280,6 +280,17 @@ namespace MtApi5
|
||||
return SendCommand<string>(Mt5CommandType.PositionGetString, commandParameters);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///The function returns the ticket of a position with the specified index in the list of open positions and automatically selects the position to work with using functions PositionGetDouble, PositionGetInteger, PositionGetString.
|
||||
///</summary>
|
||||
///<param name="index">Identifier of a position property.</param>
|
||||
public ulong PositionGetTicket(int index)
|
||||
{
|
||||
var commandParameters = new ArrayList { index };
|
||||
|
||||
return SendCommand<ulong>(Mt5CommandType.PositionGetTicket, commandParameters);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///Returns the number of current orders.
|
||||
///</summary>
|
||||
|
||||
Reference in New Issue
Block a user