예제 #1
0
 protected void SellAll(Trade trade, List <Price> prices)
 {
     trade.SellOn    = prices[TryTryurmoney.SellDate].Date;
     trade.Rate      = trade.BuyValue.GetRate(trade.SellValue);
     trade.SellValue = prices[TryTryurmoney.SellDate].Hightvalue * (StockVolume.volume);
     StockVolume.VolumeClear();
 }
예제 #2
0
        protected void BuyAll(List <Price> prices)
        {
            Deposit     deposit = new Deposit();
            Trade       trade   = new Trade();
            StockVolume stock   = new StockVolume();
            decimal     total   = 0;

            while (total < deposit.money)
            {
                total += prices[TryTryurmoney.BuyDate].LowValue;
                stock.NumberOfVolume();
            }
            trade.BuyOn    = prices[TryTryurmoney.BuyDate].Date;
            trade.BuyValue = total;
        }