Beispiel #1
0
        public ISecurity Execute(ISecurity source)
        {
            var interval = new Interval(Interval, source.IntervalBase);

            switch (interval.Base)
            {
            case DataIntervals.VOLUME:
                return(source.CompressToVolume(interval));

            case DataIntervals.PRICERANGE:
                return(source.CompressToPriceRange(interval));

            default:
                return(source.CompressTo(interval, Shift));
            }
        }