Esempio n. 1
0
 public Portfolio()
 {
     this.Id = -1;
     this.transactions = new TransactionList();
     this.positions = new PositionList();
     this.account = new Account();
     this.account.TransactionAdded += new AccountTransactionEventHandler(this.O3KsaYYaRC);
     this.monitored = true;
     this.persistent = false;
     this.marginManager = new MarginManager();
     this.marginManager.Enabled = false;
     this.performance = new Performance(this);
     this.dataLock = new object();
 }
Esempio n. 2
0
 internal PortfolioAccount(Account account)
 {
   this.account = account;
 }
Esempio n. 3
0
		public double GetValue(DateTime dateTime)
		{
			Account account = new Account(this.Currency);
			foreach (AccountTransaction transaction in this.transactions)
			{
				if (transaction.DateTime <= dateTime)
					account.Add(transaction);
			}
			double num = 0.0;
			foreach (AccountPosition accountPosition in account.Positions)
				num += Currency.Convert(accountPosition.Value, accountPosition.Currency, this.Currency, dateTime);
			return num;
		}