Version: 0.6.0
movingaverage.h
1 // Name: movingavg.h
3 // Purpose: moving average declaration
4 // Author: Moskvichev Andrey V.
5 // Created: 2010/12/17
6 // Copyright: (c) 2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef MOVINGAVERAGE_H_
11 #define MOVINGAVERAGE_H_
12 
13 #include <wx/xy/xydataset.h>
14 #include <wx/ohlc/ohlcdataset.h>
15 
19 class WXDLLIMPEXP_FREECHART MovingAverage : public XYDataset, public DatasetObserver
20 {
21  DECLARE_CLASS(MovingAverage)
22 public:
28  MovingAverage(OHLCDataset *ohlcDataset, int period);
29  virtual ~MovingAverage();
30 
31  virtual size_t GetSerieCount();
32 
33  virtual wxString GetSerieName(size_t serie);
34 
35  virtual size_t GetCount(size_t serie);
36 
37  virtual double GetX(size_t index, size_t serie);
38 
39  virtual double GetY(size_t index, size_t serie);
40 
41  //
42  // DatasetObserver
43  //
44  virtual void DatasetChanged(Dataset *dataset);
45 
46 private:
47  OHLCDataset *m_ohlcDataset;
48  int m_period;
49 };
50 
51 #endif /* MOVINGAVERAGE_H_ */
void DatasetChanged()
Definition: dataset.cpp:78
Definition: movingaverage.h:19
virtual size_t GetSerieCount()=0
virtual double GetX(size_t index, size_t serie)=0
virtual double GetY(size_t index, size_t serie)=0
Definition: ohlcdataset.h:31
Definition: dataset.h:50
Definition: xydataset.h:21
virtual size_t GetCount(size_t serie)=0
virtual wxString GetSerieName(size_t serie)=0
Definition: dataset.h:37