FastQuant.OrderBookAggr.GetAvgTickPrice C# (CSharp) Method

GetAvgTickPrice() private method

private GetAvgTickPrice ( IEnumerable ticks ) : double
ticks IEnumerable
return double
        private double GetAvgTickPrice(IEnumerable<Tick> ticks)
        {
            double val = 0;
            double total = 0;
            foreach (var t in ticks)
            {
                val += t.Price * t.Size;
                total += t.Size;
            }
            return val / total;
        }