예제 #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
 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();
 }
예제 #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);
 }