mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-15 19:58:10 +00:00
Added Position and PositionBy properties to MqlTradeRequest
This commit is contained in:
@@ -5,7 +5,7 @@ namespace MtApi5
|
|||||||
public class MqlTradeRequest
|
public class MqlTradeRequest
|
||||||
{
|
{
|
||||||
public ENUM_TRADE_REQUEST_ACTIONS Action { get; set; } // Trade operation type
|
public ENUM_TRADE_REQUEST_ACTIONS Action { get; set; } // Trade operation type
|
||||||
public uint Magic { get; set; } // Expert Advisor ID (magic number)
|
public ulong Magic { get; set; } // Expert Advisor ID (magic number)
|
||||||
public ulong Order { get; set; } // Order ticket
|
public ulong Order { get; set; } // Order ticket
|
||||||
public string Symbol { get; set; } // Trade symbol
|
public string Symbol { get; set; } // Trade symbol
|
||||||
public double Volume { get; set; } // Requested volume for a deal in lots
|
public double Volume { get; set; } // Requested volume for a deal in lots
|
||||||
@@ -19,5 +19,7 @@ namespace MtApi5
|
|||||||
public ENUM_ORDER_TYPE_TIME Type_time { get; set; } // Order expiration type
|
public ENUM_ORDER_TYPE_TIME Type_time { get; set; } // Order expiration type
|
||||||
public DateTime Expiration { get; set; } // Order expiration time (for the orders of ORDER_TIME_SPECIFIED type)
|
public DateTime Expiration { get; set; } // Order expiration time (for the orders of ORDER_TIME_SPECIFIED type)
|
||||||
public string Comment { get; set; } // Order comment
|
public string Comment { get; set; } // Order comment
|
||||||
|
public ulong Position { get; set; } // Position ticket
|
||||||
|
public ulong PositionBy { get; set; } // The ticket of an opposite position
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1777,6 +1777,8 @@ void ReadMqlTradeRequestFromCommand(MqlTradeRequest& request)
|
|||||||
request.expiration = (datetime)tmpEnumValue;
|
request.expiration = (datetime)tmpEnumValue;
|
||||||
getStringValue(ExpertHandle, 14, commentValue);
|
getStringValue(ExpertHandle, 14, commentValue);
|
||||||
request.comment = commentValue;
|
request.comment = commentValue;
|
||||||
|
getULongValue(ExpertHandle, 15, request.position);
|
||||||
|
getULongValue(ExpertHandle, 16, request.position_by);
|
||||||
}
|
}
|
||||||
|
|
||||||
string BoolToString(bool value)
|
string BoolToString(bool value)
|
||||||
|
|||||||
Reference in New Issue
Block a user