Example #1
0
 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"];
 }