Issue #120: set field 'Symbol' as optional in MqlTradeRequest (MT5)

This commit is contained in:
vdemydiuk
2018-06-04 15:36:35 +03:00
parent 6c45f28a05
commit 5d78ad5067
2 changed files with 5 additions and 3 deletions
BIN
View File
Binary file not shown.
+5 -3
View File
@@ -7299,9 +7299,11 @@ bool JsonToMqlTradeRequest(JSONObject *jo, MqlTradeRequest& request)
request.order = jo.getLong("Order");
//Symbol
CHECK_JSON_VALUE(jo, "Symbol", false);
StringInit(request.symbol, 100, 0);
request.symbol = jo.getString("Symbol");
if (jo.getValue("Symbol") != NULL)
{
StringInit(request.symbol, 100, 0);
request.symbol = jo.getString("Symbol");
}
//Volume
CHECK_JSON_VALUE(jo, "Volume", false);