protected void OnOrderCallback(object sender, OrderCallbackEventArgs value) { foreach (var item in Channels.Where(i => i.SecCode == value.SecCode)) { item.OnOrderCallback(value); } }
public void OnOrderCallback(OrderCallbackEventArgs e) { if (Orders.ContainsKey(e.Number)) { Orders[e.Number] = e; } else { Orders.Add(e.Number, e); } OrderCallback?.Invoke(this, e); }
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); } }
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); }