/** * @file XTPChartCandleStickSeriesStyle.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPCHARTCANDLESTICKSERIESSTYLE_H__) # define __XTPCHARTCANDLESTICKSERIESSTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; /** * @brief * This class represents a candle stick series style, which is a kind of * CXTPChartHighLowSeriesStyle. * * @details * A candlestick chart is a style of bar-chart used primarily to describe * price movements of a security (finance), derivative, or currency over time. * It is a combination of a line-chart and a bar-chart, in that each bar * represents the range of price movement over a given time interval. It is * most often used in technical analysis of equity and currency price patterns. */ class _XTP_EXT_CLASS CXTPChartCandleStickSeriesStyle : public CXTPChartHighLowSeriesStyle { /** @cond */ DECLARE_SERIAL(CXTPChartCandleStickSeriesStyle) /** @endcond */ public: /** * @brief * Constructs a CXTPChartCandleStickSeriesStyle object. */ CXTPChartCandleStickSeriesStyle(); /** * @brief * Destroys a CXTPChartBubbleSeriesLabel object, handles cleanup. */ virtual ~CXTPChartCandleStickSeriesStyle(); protected: /** * @brief * Call this function to create the view of the candlestick series. * @param pSeries A pointer to the chart series object. * @param pDiagramView Pointer to a chart diagram view object. * @return * The newly created CXTPChartCandleStickSeriesView pointer, which is * a kind of CXTPChartSeriesView*. */ virtual CXTPChartSeriesView* CreateView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); protected: # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartCandleStickSeriesStyle); DECLARE_OLECREATE_EX(CXTPChartCandleStickSeriesStyle) /** @endcond */ # endif }; /** * @brief * This class represents the view of a candle stick series, which is a kind * of CXTPChartSeriesView. * * @details * A candlestick chart is a style of bar-chart used primarily to describe * price movements of a security (finance), derivative, or currency over time. * It is a combination of a line-chart and a bar-chart, in that each bar * represents the range of price movement over a given time interval. It is * most often used in technical analysis of equity and currency price patterns. */ class _XTP_EXT_CLASS CXTPChartCandleStickSeriesView : public CXTPChartDiagram2DSeriesView { public: /** * @brief * Constructs a CXTPChartCandleStickSeriesView object. * * @param pSeries The chart series object pointer to which this object * is associated with. * @param pDiagramView The pointer to the diagram view. */ CXTPChartCandleStickSeriesView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); protected: /** * @brief * Call this function to create a new candlestick series point view object. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param pPoint The pointer to the chart series point object. * @param pParentView The pointer to the parent view object. * * @return * A pointer to CXTPChartCandleStickSeriesPointView, which is a kind of * CXTPChartSeriesPointView. */ CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * This function creates a label view drawing command object. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param rcBounds The rectangular boundary of the legend. * * @return * Returns a new label view drawing command object. */ virtual CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds); }; /** * @brief * This class represents the view of a candle stick series point, which is * a kind of CXTPChartSeriesPointView. */ class _XTP_EXT_CLASS CXTPChartCandleStickSeriesPointView : public CXTPChartSeriesPointView { public: /** * @brief * Constructs a CXTPChartCandleStickSeriesPointView object. * * @param pPoint A pointer to a chart series point object. * @param pParentView Parent view pointer. */ CXTPChartCandleStickSeriesPointView(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); public: /** * @brief * Call this function to create a CXTPChartDeviceCommand object. This object * handles the rendering of the candlestick series point. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return * Returns a CXTPChartDeviceCommand object. This object handles * the rendering of an element in the chart. Here it handles * the drawing of a candlestick series point. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); public: /** * @brief * Call this function to get the screen point from a series index. * * @param nIndex An integer value denoting the index. * * @return * Returns a screen point object, CXTPChartPointF. */ CXTPChartPointF GetScreenPoint(int nIndex); }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTCANDLESTICKSERIESSTYLE_H__) /** @endcond */