Pre loader

How to prepend historical data in a real-time chart

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

I am currently evaluating SciChart for use on a trading desk which trades 30 plus markets. Our existing chart is able to view years of historical data – the data is prepended on demand as users request more history. While we can probably limit the amount of historical data to load at startup we would like to preserve that functionality.

Using the append method seems to work as advertised but how would I prepend data. The Insert with an index seems slow when prepending many bars in the OhlcDataSeries.

  • You must to post comments
0
0

Hi and thanks for your enquiry!

The Insert function is pretty slow, because we haven’t optimized it for bulk updates. There is a fixed overhead per Insert operation as the entire array is resized and Min, Max are recalculated. It doesn’t have to be this way – we can add in an InsertRange function quite easily, however it will be in our next minor update (the last one just went out).

As far as rendering performance and Append you should have no problems, even with millions of OHLC candles.

There is a thread here discussing the issue of slow Insert performance. We present a workaround by creating a new DataSeries and filling with data before swapping it out of the DataSeriesSet. This should give you the performance you need. In the future we will improve this API by adding InsertRange which can do the bulk insert in one go (and quickly).

I hope this helps. If it doesn’t, or if you need more support, let me know and I’ll do my best to assist.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies