示例#1
0
        public double GetOpen(BarInfo Bar)
        {
            if (Bar == null)
            {
                return(0);
            }

            return(TickToPrice(Bar.Open));
        }
示例#2
0
        public double GetClose(BarInfo Bar)
        {
            if (Bar == null)
            {
                return(0);
            }

            return(TickToPrice(Bar.Close));
        }
示例#3
0
        public int GetBarSize(BarInfo Bar)
        {
            if (Bar == null)
            {
                return(0);
            }

            return(Bar.BarSize);
        }
示例#4
0
        public double GetHigh(BarInfo Bar)
        {
            if (Bar == null)
            {
                return(0);
            }

            return(TickToPrice(Bar.High));
        }
示例#5
0
        public double GetLow(BarInfo Bar)
        {
            if (Bar == null)
            {
                return(0);
            }

            return(TickToPrice(Bar.Low));
        }
        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;
        }
示例#7
0
        public BarInfoView Int2Double(BarInfo bar)
        {
            if (bar == null)
                return null;

            BarInfoView 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;
        }
示例#8
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);
        }
示例#9
0
 public void SetHigh(BarInfo Bar, double price)
 {
     Bar.High = PriceToTick(price);
 }
示例#10
0
 public void SetClose(BarInfo Bar, double price)
 {
     Bar.Close = PriceToTick(price);
 }
示例#11
0
        public double GetLow(BarInfo Bar)
        {
            if (Bar == null)
                return 0;

            return TickToPrice(Bar.Low);
        }
示例#12
0
 public void SetLow(BarInfo Bar, double price)
 {
     Bar.Low = PriceToTick(price);
 }
示例#13
0
        public double GetHigh(BarInfo Bar)
        {
            if (Bar == null)
                return 0;

            return TickToPrice(Bar.High);
        }
示例#14
0
 public void SetHigh(BarInfo Bar, double price)
 {
     Bar.High = PriceToTick(price);
 }
示例#15
0
        public double GetOpen(BarInfo Bar)
        {
            if (Bar == null)
                return 0;

            return TickToPrice(Bar.Open);
        }
示例#16
0
 public void SetLow(BarInfo Bar, double price)
 {
     Bar.Low = PriceToTick(price);
 }
示例#17
0
        public double GetClose(BarInfo Bar)
        {
            if (Bar == null)
                return 0;

            return TickToPrice(Bar.Close);
        }
示例#18
0
 public void SetClose(BarInfo Bar, double price)
 {
     Bar.Close = PriceToTick(price);
 }
示例#19
0
 public void SetBarSize(BarInfo Bar, int barSize)
 {
     Bar.BarSize = barSize;
 }
示例#20
0
 public void SetBarSize(BarInfo Bar, int barSize)
 {
     Bar.BarSize = barSize;
 }
示例#21
0
        public int GetBarSize(BarInfo Bar)
        {
            if (Bar == null)
                return 0;

            return Bar.BarSize;
        }
示例#22
0
 public void SetOpen(BarInfo Bar, double price)
 {
     Bar.Open = PriceToTick(price);
 }
示例#23
0
 public void SetOpen(BarInfo Bar, double price)
 {
     Bar.Open = PriceToTick(price);
 }