BCGControlBar Pro for MFC
CBCGPBaseChartStockSeries

Detailed Description

The CBCGPBaseChartStockSeries class implements the basic Stock series functionality.

The Stock series implementation differs from other series. It contains one "main" series, which is added to the Chart visual object and stores "open price" values, and three child series, which maintain "high", "low" and "close" values respectively. Child series are not added to the Chart and can't be retrieved with CBCGPChartVisualObject::GetSeries.

The child series are automatically created in constructor of CBCGPChartStockSeries and added into its internal array of child series.

You can access child series using CBCGPChartStockSeries::GetChildSeries(int nIdx) where nIdx is one of predefined indexes:

For example, if you need to retrieve a "high" value at some index nDataPointIndex:

Copy
pMainStockSeries->GetChildSeries(CBCGPChartStockSeries::CHART_STOCK_SERIES_HIGH_IDX);
double dblValueHight = pHighSeries ->GetDataPointValue(nDataPointIndex);

You don't need to explicitly add values to child series. It's done when you call CBCGPChartStockSeries::AddData.

See CBCGPChartStockSeries for more information on how to create virtual stock series reading the data from an external storage.

+ Inheritance diagram for CBCGPBaseChartStockSeries:

Public Member Functions

 GetDataPointAtCalled to retrieve a data point located at the specified index.
 
 GetDataPointCountCalled to retrieve the number of data points in a series.
 
 IsMainStockSeriesTells where a series is a "main" stock series.