Edit this page

Ohlc and Candlestick

RadChartView introduces support for stock series – both Ohlc (Open-High-Low-Close) and Candlestick. These series operate with special data points which hold information about each the following parameters: open, high, low, close. As members of the Categorical series, stock series plot their data upon a categorical (or DateTimeCategorical) axis.

Ohlc and Candlestick series are indeed two alternative ways to visualize the same data. Here is how to read the values of an Ohlc and Candlestick point:

Ohlc Candlestick
chartview-series-types-ohlc-and-candlestick 001 chartview-series-types-ohlc-and-candlestick 002

Here is how to setup Ohlc series:

Initial Setup OhlcSeries

OhlcSeries ohlcSeries = new OhlcSeries();
ohlcSeries.DataPoints.Add(new OhlcDataPoint(10, 11, 7, 8, DateTime.Now));
ohlcSeries.DataPoints.Add(new OhlcDataPoint(8, 9, 5, 9, DateTime.Now.AddDays(1)));
ohlcSeries.DataPoints.Add(new OhlcDataPoint(12, 12, 9, 10, DateTime.Now.AddDays(2)));
ohlcSeries.DataPoints.Add(new OhlcDataPoint(7, 10, 6, 9, DateTime.Now.AddDays(3)));
this.radChartView1.Series.Add(ohlcSeries);

Dim ohlcSeries As New OhlcSeries()
ohlcSeries.DataPoints.Add(New OhlcDataPoint(10, 11, 7, 8, DateTime.Now))
ohlcSeries.DataPoints.Add(New OhlcDataPoint(8, 9, 5, 9, DateTime.Now.AddDays(1)))
ohlcSeries.DataPoints.Add(New OhlcDataPoint(12, 12, 9, 10, DateTime.Now.AddDays(2)))
ohlcSeries.DataPoints.Add(New OhlcDataPoint(7, 10, 6, 9, DateTime.Now.AddDays(3)))
Me.RadChartView1.Series.Add(ohlcSeries)

Figure 1: Initial Setup OhlcSeries

chartview-series-types-ohlc-and-candlestick 003

Here is how to setup Candlestick series:

Initial Setup CandlestickSeries

CandlestickSeries candlestickSeries = new CandlestickSeries();
candlestickSeries.DataPoints.Add(new OhlcDataPoint(10, 11, 7, 8, DateTime.Now));
candlestickSeries.DataPoints.Add(new OhlcDataPoint(8, 9, 5, 9, DateTime.Now.AddDays(1)));
candlestickSeries.DataPoints.Add(new OhlcDataPoint(12, 12, 9, 10, DateTime.Now.AddDays(2)));
candlestickSeries.DataPoints.Add(new OhlcDataPoint(7, 10, 6, 9, DateTime.Now.AddDays(3)));
this.radChartView1.Series.Add(candlestickSeries);

Dim candlestickSeries As New CandlestickSeries()
candlestickSeries.DataPoints.Add(New OhlcDataPoint(10, 11, 7, 8, DateTime.Now))
candlestickSeries.DataPoints.Add(New OhlcDataPoint(8, 9, 5, 9, DateTime.Now.AddDays(1)))
candlestickSeries.DataPoints.Add(New OhlcDataPoint(12, 12, 9, 10, DateTime.Now.AddDays(2)))
candlestickSeries.DataPoints.Add(New OhlcDataPoint(7, 10, 6, 9, DateTime.Now.AddDays(3)))
Me.RadChartView1.Series.Add(candlestickSeries)

Figure 2: Initial Setup CandlestickSeries

chartview-series-types-ohlc-and-candlestick 004

See Also