Exemplo 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();
 }
Exemplo n.º 2
0
 public Portfolio Consolidate(Portfolio portfolio)
 {
     TransactionList transactionList = new TransactionList();
     foreach (Transaction transaction in this.Transactions)
         transactionList.Add(transaction, false);
     foreach (Transaction transaction in portfolio.Transactions)
         transactionList.Add(transaction, false);
     transactionList.Sort();
     Portfolio portfolio1 = new Portfolio();
     foreach (Transaction transaction in transactionList)
         portfolio1.Add(transaction);
     portfolio1.Account.Clear();
     AccountTransactionList accountTransactionList = new AccountTransactionList();
     foreach (AccountTransaction transaction in this.Account.Transactions)
         accountTransactionList.Add(transaction);
     foreach (AccountTransaction transaction in portfolio.Account.Transactions)
         accountTransactionList.Add(transaction);
     foreach (AccountTransaction transaction in accountTransactionList)
         portfolio1.Account.Add(transaction);
     return portfolio1;
 }
Exemplo n.º 3
0
		internal TransactionList(FreeQuant.Instruments.TransactionList transactionList)
		{
			this.transactionList = transactionList;
		}
Exemplo n.º 4
0
		public LiveTester(Portfolio portfolio)
		{
			this.allowRoundTrips = true;
			this.vOUewuUQI7 = new Dictionary<Instrument, LiveTester>();
			this.firstDate = new DateTime(0);
			this.lastDate = new DateTime(0);
			this.portfolio = portfolio;
			this.transactions = portfolio.Transactions;
			this.Init();
		}
Exemplo n.º 5
0
        public Position(Portfolio portfolio, Transaction transaction)
        {

            this.rik6WLpoo8 = -1;
            this.transactions = new TransactionList();
            this.GIf68BaEWm = -1;

            this.portfolio = portfolio;
            this.instrument = transaction.Instrument;
            this.Add(transaction);
        }
Exemplo n.º 6
0
        public Position(Portfolio portfolio, Instrument instrument)
        {

            this.rik6WLpoo8 = -1;
            this.transactions = new TransactionList();
            this.GIf68BaEWm = -1;
            this.portfolio = portfolio;
            this.instrument = instrument;
        }
Exemplo n.º 7
0
		internal TransactionListEnumerator(FreeQuant.Instruments.TransactionList transactionList)
		{
			this.transactionList = transactionList;
			this.enumerator = transactionList.GetEnumerator();
		}