internal AccountData(AccountEntry entry) : this() { if (entry == null) throw new ArgumentNullException(nameof(entry)); this.Tag = entry.Tag != null ? entry.Tag.ToString() : string.Empty; this.Type = entry.Type; this.Leverage = entry.Leverage; this.Balance = entry.Balance; this.Currency = entry.Currency; this.Profit = entry.Profit; this.ProfitStatus = entry.ProfitStatus; this.Margin = entry.Margin; this.MarginStatus = entry.MarginStatus; foreach (var element in entry.Trades) { var data = new TradeData(element); this.Trades.Add(data); } }