public TradeRecord(JSONObject body) { this.Closed = (bool)body["closed"]; this.ClosePrice = (double)body["closePrice"]; this.CloseTime = (long?)body["closeTime"]; this.CloseTimeString = (string)body["closeTimeString"]; this.Comment = (string)body["comment"]; this.Commission = (double)body["commission"]; this.CustomComment = (string)body["customComment"]; this.Digits = (int)body["digits"]; this.Expiration = (long?)body["expiration"]; this.ExpirationString = (string)body["expirationString"]; this.OpenPrice = (double)body["openPrice"]; this.OpenTime = (long)body["openTime"]; this.OpenTimeString = (string)body["openTimeString"]; this.Order = (long)body["order"]; this.Order2 = (long)body["order2"]; this.Position = (long)body["position"]; this.Profit = (double)body["profit"]; this.RecordType = RecordType.FromCode((int)body["recordType"]); this.Side = Side.FromCode((int)body["side"]); this.SL = (double)body["sl"]; this.Storage = (double)body["storage"]; this.Symbol = (string)body["symbol"]; this.Timestamp = (long)body["timestamp"]; this.TP = (double)body["tp"]; this.TradeType = (int)body["tradeType"]; this.Volume = (double)body["volume"]; }
public void FieldsFromJSONObject(JSONObject value) { ClosePrice = (double)value["closePrice"]; Login = (string)value["login"]; Nominal = (double)value["nominal"]; OpenPrice = (double)value["openPrice"]; Side = Side.FromCode((Int32)value["side"]); Surname = (string)value["surname"]; Symbol = (string)value["symbol"]; Timestamp = (Int64)value["timestamp"]; Volume = (double)value["volume"]; }
public IbRecord(JSONObject body) { this.ClosePrice = (double?)body["closePrice"]; this.Login = (string)body["login"]; this.Nominal = (double?)body["nominal"]; this.OpenPrice = (double?)body["openPrice"]; this.Side = Side.FromCode((int)body["side"]); this.Surname = (string)body["surname"]; this.Symbol = (string)body["symbol"]; this.Timestamp = (long?)body["timestamp"]; this.Volume = (double?)body["volume"]; }