public void DataProviderSeriesUpdated(ezDataSeriesUpdatedEventArgs update)
 {
     if (DataSeriesUpdated != null)
     {
         DataSeriesUpdated(this, update);
     }
 }
Ejemplo n.º 2
0
        void chartDataSeries_DataSeriesUpdated(object sender, DataSeriesUpdatedEventArgs e)
        {
            Spy.Print("DataSeriesUpdated (on thread)");

            if (e.TradeBarIndexUpdate == -1)
            {
                return;
            }

            var update = new ezDataSeriesUpdatedEventArgs(e.ModeIndexUpdate, e.SettlementIndexUpdate, e.TradeBarIndexUpdate);

            for (int i = e.TradeBarIndexUpdate; i < ctsChartData.TradeBars.Count; i++)
            {
                if (i >= chartData.TradeBars.Count)
                {
                    BarDataPoint bdp   = ctsChartData.TradeBars[i] as BarDataPoint;
                    var          ezBar = new ezBarDataPoint();
                    ezBar.Open       = bdp.OpenTicks;
                    ezBar.High       = bdp.HighTicks;
                    ezBar.Low        = bdp.LowTicks;
                    ezBar.Close      = bdp.CloseTicks;
                    ezBar.TradeCount = bdp.TradeCount;
                    ezBar.Volume     = bdp.Volume;
                    ezBar.TradeDate  = bdp.TradeDate;
                    ezBar.Time       = bdp.Time;
                    chartData.TradeBars.Add(ezBar);
                }
                else
                {
                    BarDataPoint bdp = ctsChartData.TradeBars[i] as BarDataPoint;
                    //var ezBar = new ezBarDataPoint(bdp.OpenTicks, bdp.HighTicks, bdp.LowTicks, bdp.CloseTicks, bdp.TradeCount, bdp.Volume, bdp.TradeDate, bdp.Time);
                    var ezBar = new ezBarDataPoint();
                    ezBar.Open       = bdp.OpenTicks;
                    ezBar.High       = bdp.HighTicks;
                    ezBar.Low        = bdp.LowTicks;
                    ezBar.Close      = bdp.CloseTicks;
                    ezBar.TradeCount = bdp.TradeCount;
                    ezBar.Volume     = bdp.Volume;
                    ezBar.TradeDate  = bdp.TradeDate;
                    ezBar.Time       = bdp.Time;
                    chartData.TradeBars.Add(ezBar);
                    chartData.UpdateTradeBar(i, ezBar);
                }
            }
            chartData.DataProviderSeriesUpdated(update);
        }
Ejemplo n.º 3
0
 void provider_DataSeriesUpdated(object sender, ezDataSeriesUpdatedEventArgs e)
 {
     //throw new NotImplementedException();
 }