Пример #1
0
 public TransactionAggregateSummary(InvType invType, IEnumerable <Transaction> transactions, Order order)
 {
     InvType      = invType;
     Transactions = transactions;
     Order        = order;
     Entries      = new List <TransactionAggregate>();
     initialize();
 }
Пример #2
0
 public TransactionAggregate(InvType invType, IEnumerable <Transaction> transactions, Order order = null)
     : this()
 {
     InvType      = invType;
     Transactions = transactions;
     Order        = order;
     processTransactions();
     calculateTotals();
 }
Пример #3
0
 public MarketAnalyzerEntry(InvType invType, EmdItemPrices.ItemPriceEntry sellOrder,
                            EmdItemPrices.ItemPriceEntry buyOrder, List <MarketHistoryEntry> history)
 {
     InvType   = invType;
     History   = history;
     Updated   = sellOrder.Updated;
     BuyPrice  = buyOrder.Price;
     SellPrice = sellOrder.Price;
     Calculate();
 }
Пример #4
0
 public MarketBrowserItem(InvType invType, IEnumerable <MarketHistoryAggregateEntry> marketHistory,
                          IEnumerable <MarketBrowserOrder> sellOrders, IEnumerable <MarketBrowserOrder> buyOrders, int donchianLength)
 {
     InvType        = invType;
     MarketHistory  = marketHistory.OrderBy(entry => entry.Date).ToList();
     BuyOrders      = buyOrders.OrderByDescending(t => t.Price).ToList();
     SellOrders     = sellOrders.OrderBy(t => t.Price).ToList();
     DonchianLength = donchianLength;
     initialize();
 }
Пример #5
0
 public TransactionAggregate(IEnumerable <IGrouping <DateTime, Transaction> > grouping, InvType invType, Order order)
     : this()
 {
     InvType = invType;
     Order   = order;
     foreach (var group in grouping)
     {
         var entry = new TransactionAggregate(group);
         processAggregate(entry);
         TradeAggregates.Add(entry);
     }
     processAggregateCollection();
     calculateTotals();
 }