예제 #1
0
        public BarSeries Compress(InputType inputType, BarType barType, long barSize)
        {
            if (this.Count == 0)
            {
                return(new BarSeries());
            }
            var quote      = this[0];
            var compressor = BarCompressor.GetCompressor(quote.Ask.InstrumentId, barType, 1, barSize);

            return(compressor.Compress(new QuoteDataEnumerator(this, inputType)));
        }
예제 #2
0
        private static BarSeries CompressBars(DataEntryEnumerator enumerator, BarType barType, long oldBarSize, long newBarSize)
        {
            BarCompressor compressor = BarCompressor.GetCompressor(barType, oldBarSize, newBarSize);

            return(compressor.Compress(enumerator));
        }