Added Position and PositionBy properties to MqlTradeRequest

This commit is contained in:
Unknown
2017-08-25 15:32:24 +02:00
parent e072343fe1
commit 29722f362d
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -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
}
}
+2
View File
@@ -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)