コード例 #1
0
ファイル: CashPosition.cs プロジェクト: w1r2p1/Core-2
        /// <summary>
        /// Initialize cash holder for a quant fund
        /// </summary>
        /// <param name="basecurrency"></param>
        /// <param name="initialcash"></param>
        public CashPosition(CurrencyType basecurrency, decimal initialcash)
        {
            InitialCash  = initialcash;
            BaseCurrency = basecurrency;

            //Add initial cash
            _settledcash = new SettledCash(initialcash);
        }
コード例 #2
0
ファイル: CashPosition.cs プロジェクト: w1r2p1/Core-2
 /// <summary>
 /// Add cash to this holder of cash
 /// </summary>
 /// <param name="cash"></param>
 public void AddCash(SettledCash cash)
 {
     //Check if this settled or unsettled cash
     if (cash is UnsettledCash unsettledfunds)
     {
         _unsettledcash.Add(unsettledfunds);
     }
     else
     {
         _settledcash.AddFunds(cash.Amount);
     }
 }