private void UpdatePriceChart()
        {
            PriceData = (IOhlcDataSeries<DateTime, double>)_priceData.ToDiscontinuousSeries(Calendar);
            PriceData.SeriesName = "PriceData";

            // Create a series for the 200 period SMA which will be plotted as a line chart
            Sma200Series = (IXyDataSeries<DateTime, double>) PriceData.ToMovingAverage(200);
            Sma200Series.SeriesName = "200 SMA";

            // Create a series for the 50 period SMA which will be plotted as a line chart
            Sma50Series = (IXyDataSeries<DateTime, double>)PriceData.ToMovingAverage(50);
            Sma50Series.SeriesName = "50 SMA";

            // Update the chart type and timeframe with current settings
            UpdateChartType(_chartType);
            UpdateAnnotations();

            _priceSeries.InvalidateParentSurface(RangeMode.ZoomToFit);
        }