Пример #1
0
 private void OnNewCorporateAction(object sender, CorporateActionEventArgs args)
 {
     if (this.HandleMarketData(args.Provider, args.Instrument))
     {
         this.metaStrategyBase.SetNewCorporateAction(args);
     }
 }
Пример #2
0
 internal void EmitNewCorporateAction(CorporateActionEventArgs e)
 {
     this.CorporateAction = e.CorporateAction;
     if (this.NewCorporateAction != null)
     {
         this.NewCorporateAction(this, e);
     }
 }
Пример #3
0
        private static void OnNewCorporateAction(object sender, CorporateActionEventArgs e)
        {
            Instrument instrument = e.Instrument as Instrument ?? InstrumentManager.Instruments[e.Instrument.Symbol, e.Provider.Name];

            if (instrument == null)
            {
                return;
            }
            CorporateActionArray array = DataManager.corporateActionArrayList[instrument];

            array.Add(e.CorporateAction);
            if (DataManager.corporateActionArrayLength != -1 && array.Count > DataManager.corporateActionArrayLength)
            {
                array.RemoveAt(0);
            }
            instrument.EmitNewCorporateAction(e);
        }