OnData() private method

private OnData ( DataObject obj ) : void
obj DataObject
return void
示例#1
0
        private void OnAsk(Event e)
        {
            DataEventCount++;
            var ask = (Ask)e;

            SyncLocalClockWithDataObject(ask);
            SyncExchangeClockWithTick(ask, nameof(OnAsk));
            BarFactory.OnData(ask);
            this.framework.DataManager.OnAsk(ask);
            this.framework.InstrumentManager.GetById(ask.InstrumentId).Ask = ask;
            this.framework.ProviderManager.ExecutionSimulator.OnAsk(ask);
            this.framework.StrategyManager.OnAsk(ask);
        }
示例#2
0
        private void OnTrade(Event e)
        {
            DataEventCount++;
            var trade = (Trade)e;

            SyncLocalClockWithDataObject(trade);
            SyncExchangeClockWithTick(trade, nameof(OnTrade));
            BarFactory.OnData(trade);
            this.framework.DataManager.OnTrade(trade);
            this.framework.InstrumentManager.GetById(trade.InstrumentId).Trade = trade;
            this.framework.ProviderManager.ExecutionSimulator.OnTrade(trade);
            this.framework.StrategyManager.OnTrade(trade);
        }
示例#3
0
        private void OnBid(Event e)
        {
            DataEventCount++;
            var bid = (Bid)e;

            SyncLocalClockWithDataObject(bid);
            SyncExchangeClockWithTick(bid, nameof(OnBid));
            BarFactory.OnData(bid);
            this.framework.DataManager.OnBid(bid);
            this.framework.InstrumentManager.GetById(bid.InstrumentId).Bid = bid;
            this.framework.ProviderManager.ExecutionSimulator.OnBid(bid);
            this.framework.StrategyManager.OnBid(bid);
        }