예제 #1
0
 protected void OnOrderCallback(object sender, OrderCallbackEventArgs value)
 {
     foreach (var item in Channels.Where(i => i.SecCode == value.SecCode))
     {
         item.OnOrderCallback(value);
     }
 }
예제 #2
0
        public void OnOrderCallback(OrderCallbackEventArgs e)
        {
            if (Orders.ContainsKey(e.Number))
            {
                Orders[e.Number] = e;
            }
            else
            {
                Orders.Add(e.Number, e);
            }

            OrderCallback?.Invoke(this, e);
        }
예제 #3
0
        public void OnOrderCallback(OrderCallbackEventArgs e)
        {
            if (Orders.ContainsKey(e.Number))
            {
                Orders[e.Number] = e;
            }
            else
            {
                Orders.Add(e.Number, e);
            }

            OrderCallback?.Invoke(this, e);
        }
예제 #4
0
        public static void order_status_callback_impl(
            Int32 nMode, UInt32 dwTransID, Double dNumber, string ClassCode, string SecCode,
            Double dPrice, Int32 nBalance, Double dValue, Int32 nIsSell, Int32 nStatus, Int32 nOrderDescriptor)
        {
            OrderCallbackEventArgs ocp = new OrderCallbackEventArgs
            {
                Mode            = nMode,
                TransID         = dwTransID,
                Number          = dNumber,
                ClassCode       = ClassCode,
                SecCode         = SecCode,
                Price           = dPrice,
                Balance         = nBalance,
                Value           = dValue,
                IsSell          = nIsSell,
                Status          = nStatus,
                OrderDescriptor = nOrderDescriptor
            };

            if (OrderCallback != null)
            {
                OrderCallback(null, ocp);
            }
        }
예제 #5
0
        public static void order_status_callback_impl(
                Int32 nMode, UInt32 dwTransID, Double dNumber, string ClassCode, string SecCode,
                Double dPrice, Int32 nBalance, Double dValue, Int32 nIsSell, Int32 nStatus, Int32 nOrderDescriptor)
        {
            OrderCallbackEventArgs ocp = new OrderCallbackEventArgs
            {
                Mode = nMode,
                TransID = dwTransID,
                Number = dNumber,
                ClassCode = ClassCode,
                SecCode = SecCode,
                Price = dPrice,
                Balance = nBalance,
                Value = dValue,
                IsSell = nIsSell,
                Status = nStatus,
                OrderDescriptor = nOrderDescriptor
            };

            if (OrderCallback != null) OrderCallback(null, ocp);
        }
예제 #6
0
 protected void OnOrderCallback(object sender, OrderCallbackEventArgs value)
 {
     foreach (var item in Channels.Where(i => i.SecCode == value.SecCode))
     {
         item.OnOrderCallback(value);
     }
 }