public BarInfoView Int2Double(BarInfo bar)
        {
            if (bar == null)
                return null;

            var field = new BarInfoView();

            field.Open = Codec.TickToPrice(bar.Open);
            field.High = Codec.TickToPrice(bar.High);
            field.Low = Codec.TickToPrice(bar.Low);
            field.Close = Codec.TickToPrice(bar.Close);
            field.BarSize = bar.BarSize;

            return field;
        }
        public BarInfo Double2Int(BarInfoView bar)
        {
            if (bar == null)
                return null;

            BarInfo field = new BarInfo();
            
            field.Open = Codec.PriceToTick(bar.Open);
            field.High = Codec.PriceToTick(bar.High);
            field.Low = Codec.PriceToTick(bar.Low);
            field.Close = Codec.PriceToTick(bar.Close);
            field.BarSize = bar.BarSize;

            return field;
        }
        public BarInfoView Int2Double(BarInfo bar)
        {
            if (bar == null)
            {
                return(null);
            }

            var field = new BarInfoView();

            field.Open    = Codec.TickToPrice(bar.Open);
            field.High    = Codec.TickToPrice(bar.High);
            field.Low     = Codec.TickToPrice(bar.Low);
            field.Close   = Codec.TickToPrice(bar.Close);
            field.BarSize = bar.BarSize;

            return(field);
        }
Esempio n. 4
0
        public BarInfo Double2Int(BarInfoView bar)
        {
            if (bar == null)
            {
                return(null);
            }

            var field = new BarInfo();

            field.Open    = Codec.PriceToTick(bar.Open);
            field.High    = Codec.PriceToTick(bar.High);
            field.Low     = Codec.PriceToTick(bar.Low);
            field.Close   = Codec.PriceToTick(bar.Close);
            field.BarSize = bar.BarSize;

            return(field);
        }