public void updatePreMergeRTBarSeries(RTDataBar bar)
        {
            if (isDataMerged)
            {
                return;
            }

            DateTime          time           = bar.time;
            MarketDataElement currentRTBData = MarketDataUtil.convertBarToMarketDataElement(bar);

            if (preMergeRTBarSeries == null)
            {
                preMergeRTBarSeries = new SeriesBuilder <DateTime, MarketDataElement>()
                {
                    { time, currentRTBData }
                }.Series;
            }
            else
            {
                if (!preMergeRTBarSeries.ContainsKey(time))
                {
                    preMergeRTBarSeries = preMergeRTBarSeries.Merge(new SeriesBuilder <DateTime, MarketDataElement>()
                    {
                        { time, currentRTBData }
                    }.Series);
                }
            }
            return;
        }
Ejemplo n.º 2
0
 public void synchronizeRTBDataActionsIfNeeded(RTDataBar completeRTBar, DateTime currentBarTime, Boolean mergeDataIsNeed)
 {
     if (!mergeDataIsNeed)
     {
         return;
     }
     if (completeRTBar != null)
     {
         RTBSynchronizer.updatePreMergeRTBarSeries(completeRTBar);
     }
     RTBSynchronizer.mergeRTBHistDataIfValid();
     RTBSynchronizer.reqHistDataIfValid(currentBarTime, tickerInfo.whatToShow, parentUI.GetMDContract());
 }