BCGSuite for MFC
CBCGPChartAdvancedFormulaabstract

Detailed Description

The CBCGPChartAdvancedFormula class is an abstract base class for various formulas that can be applied to a chart series and generate a new series whose data points are computed using a custom algorithm.

Currently this class establishes an infrastructure for building financial indicators, but can be used to generate data points for any input series.

You can derive a custom class from CBCGPChartAdvancedFormula and override CBCGPChartAdvancedFormula::CalculateDataPoint method to update a data point at the specified index. This method will be called when you attach an input series or change any input parameters. If your input series is updated in the real time, you need to call UpdateLastDataPoints to sync the output series with the input. You can use CBCGPChartSeries::GetDataBuffer to store any data for intermediate calculations.

You must also override CBCGPChartAdvancedFormula::CopyFrom if your custom class has to store any private data.

The Create method should be called (and can be overridden in a derived class) to display the formula on chart.

+ Inheritance diagram for CBCGPChartAdvancedFormula:

Public Member Functions

 CalculateDataPointCalculates Y value for the specifies data point and input series.
 
 CopyFromCopies the formula data from the source formula.
 
 CreateCreates a formula.
 
 GeneratePointsCalled to generate data points for an output series.
 
 GetOutputSeriesCategoryReturns output series category.
 
 GetOutputSeriesTypeReturns output series type.
 
 GetPeriodReturns formula period.
 
 SetOutputSeriesCategorySets output series category.
 
 SetOutputSeriesTypeSets output series type.
 
 SetPeriodSets formula period.
 
 UpdateLastDataPointsUpdates last data points.
 
- Public Member Functions inherited from CBCGPChartBaseFormula
 FindInputSeriesIndexFinds input series index.
 
 GetInputSeriesAtReturns an input series located at the specified position.
 
 GetInputSeriesCountReturns the number of input series.
 
 GetLParamReturns user-defined data.
 
 GetParentSeriesReturns a pointer to a parent series.
 
 IsNonDiscreteCurveTells whether the formula is displayed as a non-discrete curve.
 
 SetLParamSets user-defined data.
 
 SetParentSeriesSets a parent series that represents a formula on the diagram.
 

Public Attributes

 m_bUseLongDataDefines how data points are added to the output series.