Login Page - Create Account

Support Board

Date/Time: Thu, 27 Feb 2020 05:22:12 +0000

Historical Market Depth Data Recording

[2020-01-14 21:02:40]
User41727 - Posts: 102 | Ending Date: 2020-02-27
I am trying to understand how the historical market depth data, as for instance used by the "Bid & Ask Depth Bars" study, is recorded when only L1 data is available, e.g. when using the SC data feed for equities. My assumption was that SC would record the latest bid/ask volume at each level as the L1 quotes become available in order to build up the book data.

Now, I have attempted to recreate that approach by recording sc.BidSize/sc.AskSize for their respective levels. But while the data looks overall reasonably similar, there are usually some discrepancies for each bar between the data collected this way and the data available via the market depth API. The question is why. Do I misunderstand the way SC does collect this data? Is there a way to receive the same data that is saved into as the depth data in real time without having to read from the file and thus avoid the costly I/O? And which set of data is more accurate?

'MaintainAdditionalChartDataArrays' and 'UpdateAlways' are enabled, so this should not be the case that the study is simply not being called when the data changes.
[2020-01-15 19:11:27]
User41727 - Posts: 102 | Ending Date: 2020-02-27
A response would be appreciated.
[2020-01-16 09:29:12]
Sierra Chart Engineering - Posts: 81517 | Ending Date: 2020-06-09
The only way to re-create this is to access the bid and ask updates through the Time and Sales data:

But this is only valid in the case of when there is no market depth data and only the top of the book.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2020-01-16 09:29:33
[2020-01-16 17:32:06]
User41727 - Posts: 102 | Ending Date: 2020-02-27
So, the problem is essentially that you do not receive all of the updates, and the only way to mitigate that would be by lowering the chart update interval.

Does sc.GetTimeAndSales() read the data from the respective SCID file, or is this cached in memory somewhere? The reason I am asking is because it seems that the files can sometimes take a bit of time do be updated, at least the .depth files do, which may have something to do with having a large number of charts open that each collect depth data. This regularly creates situations where the calculated value of the "Bid & Ask Depth Bar" study is not correct when calculated in real time, and it changes after recalculation. I had opened a thread about this some months ago, but never really got an answer. Presumably, there is a race going on between the study reading the data and whatever thread is updating the .depth files. Hence, why I am trying to do the entire calculation in memory and avoid reading stale data.

BTW, are you ever going to offer L2 for equities via the SC feed? Not having that data mean flying half blind, although the current solutions seems to work reasonably well.

To post a message in this thread, you need to login with your Sierra Chart account:


Login Page - Create Account