public void Update(CCluster cluster) { AmountTotal += cluster.AmountTotal; AmountBuy += cluster.AmountBuy; AmountSell += cluster.AmountSell; if (AmountSell > AmountBuy) { TotalDir = EnmDealDirection.Sell; } else { TotalDir = EnmDealDirection.Buy; } }
public void Update(CDeal deal) { AmountTotal += deal.Amount; if (deal.Direction == EnmDealDirection.Buy) { AmountBuy += deal.Amount; } else { AmountSell += deal.Amount; } if (AmountSell > AmountBuy) { TotalDir = EnmDealDirection.Sell; } else { TotalDir = EnmDealDirection.Buy; } }