/// <summary> /// Метод срабатывает при поступлении новых значений Level1 /// </summary> /// <param name="security"></param> /// <param name="changes"></param> /// <param name="arg3"></param> /// <param name="arg4"></param> private void Level1Changed(StockSharp.BusinessEntities.Security security, IEnumerable<KeyValuePair<Level1Fields, object>> changes, DateTimeOffset arg3, DateTime arg4) { if (info.IsChannelOpened(operationContext)) { List<KeyValuePair<Level1, object>> listChanges = new List<KeyValuePair<Level1, object>>(); foreach (var change in changes) { if (change.Key != (Level1Fields)Level1.BestBidTime && change.Key != (Level1Fields)Level1.BestAskTime) { var kV = new KeyValuePair<Level1, object>((Level1)change.Key, change.Value); listChanges.Add(kV); } } if (operationContext.Channel.State == CommunicationState.Opened) { Callback.NewLevel1Values((Security)security, listChanges); } } }
//Callback for SubscribeMarketData -> NewNews private void NewNews(StockSharp.BusinessEntities.News news) { Console.WriteLine("NewNews {0}", news.Headline); Callback.NewNews((News)news); }