diff --git a/MtApi5/MqlTradeRequest.cs b/MtApi5/MqlTradeRequest.cs index 64c0977f..73e3c99a 100755 --- a/MtApi5/MqlTradeRequest.cs +++ b/MtApi5/MqlTradeRequest.cs @@ -5,7 +5,7 @@ namespace MtApi5 public class MqlTradeRequest { 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 string Symbol { get; set; } // Trade symbol 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 DateTime Expiration { get; set; } // Order expiration time (for the orders of ORDER_TIME_SPECIFIED type) 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 } } diff --git a/mq5/MtApi5.mq5 b/mq5/MtApi5.mq5 index ef8935db..c3501f59 100755 --- a/mq5/MtApi5.mq5 +++ b/mq5/MtApi5.mq5 @@ -1777,6 +1777,8 @@ void ReadMqlTradeRequestFromCommand(MqlTradeRequest& request) request.expiration = (datetime)tmpEnumValue; getStringValue(ExpertHandle, 14, commentValue); request.comment = commentValue; + getULongValue(ExpertHandle, 15, request.position); + getULongValue(ExpertHandle, 16, request.position_by); } string BoolToString(bool value)