예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }
예제 #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);
        }