Exemple #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();
 }
Exemple #2
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();
 }
Exemple #3
0
 public void ClosePortfolio(string text)
 {
   PositionList positionList = new PositionList();
   foreach (Position position in this.portfolio.Positions)
     positionList.Add(position);
   foreach (Position position in positionList)
     this.ClosePosition(position.Instrument, text);
 }