コード例 #1
0
ファイル: Portfolio.cs プロジェクト: heber/FreeOQ
 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();
 }
コード例 #2
0
ファイル: Portfolio.cs プロジェクト: smther/FreeOQ
 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;
 }
コード例 #3
0
ファイル: TransactionList.cs プロジェクト: heber/FreeOQ
		internal TransactionList(FreeQuant.Instruments.TransactionList transactionList)
		{
			this.transactionList = transactionList;
		}
コード例 #4
0
ファイル: LiveTester.cs プロジェクト: heber/FreeOQ
		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();
		}
コード例 #5
0
ファイル: Position.cs プロジェクト: heber/FreeOQ
        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);
        }
コード例 #6
0
ファイル: Position.cs プロジェクト: heber/FreeOQ
        public Position(Portfolio portfolio, Instrument instrument)
        {

            this.rik6WLpoo8 = -1;
            this.transactions = new TransactionList();
            this.GIf68BaEWm = -1;
            this.portfolio = portfolio;
            this.instrument = instrument;
        }
コード例 #7
0
		internal TransactionListEnumerator(FreeQuant.Instruments.TransactionList transactionList)
		{
			this.transactionList = transactionList;
			this.enumerator = transactionList.GetEnumerator();
		}