SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.


How do I extract the latest OHLC datapoint from renderableSeries.DataSeries?

I need to extract all open, high, low & close values for the last candlestick in the chart. It is a real-time chart, so values are changing constantly.

  • You must to post comments

Hi there,

something like this:

var ohlcDataSeries = renderableSeries.DataSeries as OhlcDataSeries<DateTime, double>;
int count = ohlcDataSeries.Count;
DateTime date = ohlcDataSeries.XValues[count - 1];
double open = ohlcDataSeries.OpenValues[count - 1];
double high = ohlcDataSeries.HighValues[count - 1];
double low = ohlcDataSeries.LowValues[count - 1];
double close = ohlcDataSeries.CloseValues[count - 1]; // Note: CloseValues == YValues

That should do it!

If you want to be notified when data changes, you can subscribe to the SciChartSurface.Rendered event, or just get this value out when the data is appended.

Are you trying to create a latest price indicator on the axis? If so see the answer to your other post… 🙂

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.