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(); }
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; }
internal TransactionList(FreeQuant.Instruments.TransactionList transactionList) { this.transactionList = transactionList; }
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(); }
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); }
public Position(Portfolio portfolio, Instrument instrument) { this.rik6WLpoo8 = -1; this.transactions = new TransactionList(); this.GIf68BaEWm = -1; this.portfolio = portfolio; this.instrument = instrument; }
internal TransactionListEnumerator(FreeQuant.Instruments.TransactionList transactionList) { this.transactionList = transactionList; this.enumerator = transactionList.GetEnumerator(); }