Beispiel #1
0
 public TransactionAggregateSummary(InvType invType, IEnumerable <Transaction> transactions, Order order)
 {
     InvType      = invType;
     Transactions = transactions;
     Order        = order;
     Entries      = new List <TransactionAggregate>();
     initialize();
 }
Beispiel #2
0
 public TransactionAggregate(InvType invType, IEnumerable <Transaction> transactions, Order order = null)
     : this()
 {
     InvType      = invType;
     Transactions = transactions;
     Order        = order;
     processTransactions();
     calculateTotals();
 }
Beispiel #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();
 }
Beispiel #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();
 }
Beispiel #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();
 }