#include <ChartCandlestickSerie.h>
Public Member Functions | |
CChartCandlestickSerie (CChartCtrl *pParent) | |
Constructor. | |
~CChartCandlestickSerie () | |
Destructor. | |
bool | IsPointOnSerie (const CPoint &screenPoint, unsigned &uIndex) const |
Tests if a certain screen point is on the series. | |
void | AddPoint (double XVal, double Low, double High, double Open, double Close) |
Adds a new point in the series. | |
void | SetWidth (int Width) |
Sets the width (in pixels) of all candlestick points in the series. | |
int | GetWidth () |
Returns the width (in pixels) of a point in the series. | |
Protected Member Functions | |
void | DrawLegend (CDC *pDC, const CRect &rectBitmap) const |
Draws the legend icon for the series. | |
void | Draw (CDC *pDC) |
Draws the most recent points of the series. | |
void | DrawAll (CDC *pDC) |
Redraws the full series. |
Each point in the series has an X value (the time), a high value (the highest market price), a low value (the lowest market price), an open value (the market price at the opening) and a close value (the market price at the closing).
void CChartCandlestickSerie::AddPoint | ( | double | XVal, | |
double | Low, | |||
double | High, | |||
double | Open, | |||
double | Close | |||
) |
Adds a new point in the series.
XVal | The X value of the point (the time) | |
Low | The lowest market price | |
High | The highest market price | |
Open | The market price at the opening | |
Close | The market price at the closing |
void CChartCandlestickSerie::Draw | ( | CDC * | pDC | ) | [protected, virtual] |
Draws the most recent points of the series.
This function should only draw the points that were not previously drawn.
pDC | The device context used to draw |
Implements CChartSerie.
void CChartCandlestickSerie::DrawAll | ( | CDC * | pDC | ) | [protected, virtual] |
void CChartCandlestickSerie::DrawLegend | ( | CDC * | pDC, | |
const CRect & | rectBitmap | |||
) | const [protected, virtual] |
Draws the legend icon for the series.
pDC | The device context used to draw | |
rectBitmap | The rectangle in which to draw the legend icon |
Implements CChartSerie.
bool CChartCandlestickSerie::IsPointOnSerie | ( | const CPoint & | screenPoint, | |
unsigned & | uIndex | |||
) | const [virtual] |
Tests if a certain screen point is on the series.
screenPoint | The screen point to test | |
uIndex | If the point is close to a specific point of the series, its index is stored here. |
Implements CChartSerie.