BCGSuite for MFC
CBCGPChartStockSeries

Detailed Description

The CBCGPChartStockSeries implements the functionality of a series used to display financial data in OHLC format.

You can display a stock series as:

  • ohlc bars
  • candlesticks
  • line built on open, high, low, close values or custom.

You can set the series display type by calling CBCGPChartStockSeries::SetStockSeriesType. In the line mode you can customize the displayed values for each data point by specifying a custom callback (CBCGPChartStockSeries::SetCustomStockValueCallback) or overriding CBCGPChartStockSeries::GetCustomStockValue.

If you need to create a virtual series reading the data from an external storage you have to derive a class from CBCGPChartStockSeries and override the following methods:

Please take a look at ChartStockView.cpp and ChartStockRTView.cpp (BCGPChartExample) for more information about implementation of static and real time stock charts.

+ Inheritance diagram for CBCGPChartStockSeries:

Public Member Functions

 CBCGPChartStockSeriesCreates a CBCGPChartStockSeries object.
 
 AddDataAdds stock data.
 
 AddDataAdds stock data.
 
 AddDataAdds stock data.
 
 GetCustomStockValue 
 
 GetCustomStockValueCallbackReturns a pointer to a callback that calculates custom stock values.
 
 GetStockDataAtReturns stock data located at the specified index.
 
 GetStockSeriesTypeReturns the current stock series type.
 
 OnGetDataPointTooltipOverridden. Returns tooltip and description for stock data points.
 
 SetCustomStockValueCallbackSets a callback to calculate custom stock values.
 
 SetStockSeriesTypeSets stock series type.
 
- Public Member Functions inherited from CBCGPBaseChartStockSeries
 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.
 

Public Attributes

 m_downBarStyleSpecifies "down" bar style.
 
 m_downCandleStyleSpecifies "down" candlestick style.
 
 m_nOpenCloseBarSizePercentSpecifies the size (width), in percents from the size of major unit, of candlesticks and bars.
 

Static Public Attributes

 CHART_STOCK_SERIES_HIGH_IDXIndex of child series containing "high" stock values.
 
 CHART_STOCK_SERIES_LOW_IDXIndex of child series containing "low" stock values.
 
 CHART_STOCK_SERIES_CLOSE_IDXIndex of child series containing "close" stock values.