Ejemplo n.º 1
0
        public double GetSettlementPrice(StaticInfo Static)
        {
            if (Static == null)
            {
                return(0);
            }

            return(TickToPrice(Static.SettlementPrice) / _config.SettlementPriceMultiplier);
        }
Ejemplo n.º 2
0
        public double GetUpperLimitPrice(StaticInfo Static)
        {
            if (Static == null)
            {
                return(0);
            }

            return(TickToPrice(Static.UpperLimitPrice));
        }
Ejemplo n.º 3
0
        public StaticInfo Double2Int(StaticInfoView Static)
        {
            if (Static == null)
                return null;

            StaticInfo field = new StaticInfo();
            
            Codec.SetLowerLimitPrice(field, Static.LowerLimitPrice);
            Codec.SetUpperLimitPrice(field, Static.UpperLimitPrice);
            Codec.SetSettlementPrice(field, Static.SettlementPrice);

            field.Symbol = Static.Symbol;
            field.Exchange = Static.Exchange;

            return field;
        }
Ejemplo n.º 4
0
        public StaticInfoView Int2Double(StaticInfo Static)
        {
            if (Static == null)
                return null;

            StaticInfoView field = new StaticInfoView();

            field.LowerLimitPrice = Codec.GetLowerLimitPrice(Static);
            field.UpperLimitPrice = Codec.GetUpperLimitPrice(Static);
            field.SettlementPrice = Codec.GetSettlementPrice(Static);

            field.Symbol = Static.Symbol;
            field.Exchange = Static.Exchange;

            return field;
        }
Ejemplo n.º 5
0
        public StaticInfo Double2Int(StaticInfoView Static)
        {
            if (Static == null)
            {
                return(null);
            }

            var field = new StaticInfo();

            Codec.SetLowerLimitPrice(field, Static.LowerLimitPrice);
            Codec.SetUpperLimitPrice(field, Static.UpperLimitPrice);
            Codec.SetSettlementPrice(field, Static.SettlementPrice);

            field.Symbol   = Static.Symbol;
            field.Exchange = Static.Exchange;

            return(field);
        }
Ejemplo n.º 6
0
 public void SetUpperLimitPrice(StaticInfo Static, double price)
 {
     Static.UpperLimitPrice = PriceToTick(price);
 }
Ejemplo n.º 7
0
 public void SetSettlementPrice(StaticInfo Static, double price)
 {
     Static.SettlementPrice = PriceToTick(price * _config.SettlementPriceMultiplier);
 }
Ejemplo n.º 8
0
        public double GetUpperLimitPrice(StaticInfo Static)
        {
            if (Static == null)
                return 0;

            return TickToPrice(Static.UpperLimitPrice);
        }
Ejemplo n.º 9
0
 public void SetUpperLimitPrice(StaticInfo Static, double price)
 {
     Static.UpperLimitPrice = PriceToTick(price);
 }
Ejemplo n.º 10
0
        public double GetSettlementPrice(StaticInfo Static)
        {
            if (Static == null)
                return 0;

            return (TickToPrice(Static.SettlementPrice) / _config.SettlementPriceMultiplier);
        }
Ejemplo n.º 11
0
 public void SetSettlementPrice(StaticInfo Static, double price)
 {
     Static.SettlementPrice = PriceToTick(price * _config.SettlementPriceMultiplier);
 }