Login Page - Create Account

Support Board


Date/Time: Sun, 15 Jun 2025 07:03:38 +0000



Accessing Real Time bid and ask prices in replay - sc.Bid and sc.Ask Discrepancies?

View Count: 467

[2025-05-28 16:41:37]
codac99 - Posts: 9
/// TLDR: OP Ask question -> SC support not respond -> OP annoyed -> OP leave Sierra Chart ///


Hi SC Team,

Will keep this quick.

I have built a cpp study for the logging of best bid and ask prices during a historical replay when a condition is met (when the best bid and ask price changes, I want to log them - see below). This is current being posted via TCP.

// Initial Logging Condition
if (BestBid == LastBid || BestAsk == LastAsk)
return;

I cannot replicate the output when I apply this same condition to the depth files directly, utilising the documentation to construct a top of book DOM effectively. I have absolutely no concerns with this as I have benchmarked it against Databento's data for the same date range that was constructed from MBO and the match is 100%.

What I need to know...

What are/could be the limitations of using sc.Bid and sc.Ask to check every single bid and ask price change, I have tried multiple bar periods including 1 Trade index and UpdateAlways settings at minimum, as well as all possible combinations of this and auto-looping (0 and 1).

Is sc.Bid and sc.Ask based on the raw depth data (this is highly important for alignment as I will be taking a snapshot and piping to deep learning network, really all I care about), if not, how can this be done.

It is worth noting regarding the last question, I attempted to utilise the real time market depth functions and then get the best bid and ask from that but there was even more issue with loss of granularity of the extracted bid and ask price pair from this.

Is there a way to direct raw data feed into external program, yes I am almost certain there is not but can't hurt to ask.

This is end of the line for my model implementation, usually this is first but Databento decided to no longer support usage based live data so here we are. If any of your proposed solutions impact LIVE data processing, please let me know so I can start mentally preparing a solution.

Thanks Team,

CW
Date Time Of Last Edit: 2025-06-08 03:55:28
[2025-05-29 14:24:05]
codac99 - Posts: 9
Hi,

I have attempted to utilise c_ACSILDepthBars to access the best bid and ask prices, but the fact that you have to start at the opposite ends of the order book and there are no other functions to access immediate levels (best levels) has given me a brain aneurysm.

I give up.
[2025-06-02 14:13:36]
codac99 - Posts: 9
Following up.... again.

Extremely frustrated with this issue, compound the fact that data fees do not roll into the next months and you have clients with big headaches (me).

If you value my business, I would love an outreach.

My only option by COB tomorrow will be to set up another pipeline with an alternative provider. I really am against this because I do value the service you provide and appreciate how competitive it is.
Date Time Of Last Edit: 2025-06-02 14:56:21
[2025-06-02 15:03:15]
User431178 - Posts: 711
NOTE: Not support, just another user.

What are/could be the limitations of using sc.Bid and sc.Ask to check every single bid and ask price change, I have tried multiple bar periods including 1 Trade index and UpdateAlways settings at minimum, as well as all possible combinations of this and auto-looping (0 and 1).

Unless you data is recorded using BID_ASK_TRADE_SYNC, the data file only has bid/ask prices recorded when a trade occurs.

Data Recording Modes: -BID_ASK_TRADE_SYNC

Is sc.Bid and sc.Ask based on the raw depth data
No, its' independent of depth data, live comes from the price feed and replay comes from the data file.

Trade Simulation: Trade Simulation Accuracy and Bid/Ask Prices During Replays

I have attempted to utilise c_ACSILDepthBars to access the best bid and ask prices, but the fact that you have to start at the opposite ends of the order book and there are no other functions to access immediate levels (best levels) has given me a brain aneurysm.

You can access any level directly, you just need to convert the price to tickindex (for which there is a function).

ACSIL Interface Members - Historical Market Depth Data (c_ACSILDepthBars): PriceToTickIndex
ACSIL Interface Members - Historical Market Depth Data (c_ACSILDepthBars): GetLastAskQuantity
ACSIL Interface Members - Historical Market Depth Data (c_ACSILDepthBars): GetLastAskQuantity

However, that is probably not going to help you find the best bid/ask prices, although maybe it can work if you are on a 1-Trade chart.
Date Time Of Last Edit: 2025-06-02 15:03:23
[2025-06-02 15:22:45]
codac99 - Posts: 9
Hi User431178,

Appreciate the outreach however this isn't really what we are after and is, in my opinion, a fundamentally flawed way to measure the best bid and ask prices.

Just so it is out there, I am defining the best bid and ask as the lowest ask price and highest bid price where there is passive liquidity available, this is very simple. We can't consume (trade) liquidity that isn't there for us and so it is no guarantee that the last price levels that have traded still hold limit orders that aggressors can hit.

This then leads into the next issue we have had which is using the c_ACSILDepthBars to access the volume at price levels to construct a limit order book.

The interface member is absolutely useless with the above context, because the best bid and ask prices are not reflective of the best levels in the book, and thus we need to search the whole set of available levels to locate the best bid and ask levels and/or build a real time LOB unambiguously.

We have utilise the 1 trade chart, it makes not difference. I think my best option is to attempt to get synchronicity with live data (not in replay) using the current market depth data member but I haven't taken this any further than a thought. If that works, I am set, we have a very promising Deep Learning model that has been trained on 5 years of tick-by-tick CME data.

Please note my above opinion and finding applies to only processing historical data using DepthBars member.

Do you know if there is any way to access these bid and ask prices as defined above in real time when the feed is live and not reading from the depth files in the data folder?

Thanks again User431178
Date Time Of Last Edit: 2025-06-02 15:24:24
[2025-06-02 16:35:58]
User431178 - Posts: 711

Do you know if there is any way to access these bid and ask prices as defined above in real time when the feed is live and not reading from the depth files in the data folder?

For real-time you can:
a. Check sc.Ask and sc.Bid directly, AFAIK these values are transmitted as part of the market data update message into Sierra Chart.
The limitation here being that you are seeing snap-shots at the frequency of the chart update interval.

b. Read from the time and sales data, when running live this had trades and bid/ask price updates as separate records, so you can see all updates in-between the chart updates.
ACSIL Interface Members - Functions: sc.GetTimeAndSales()

c. Read the live market depth data, as you suggest, wih the same limitation as a. (if that is even a problem for you).
At level index zero, for each of ask and bid, that would give you the price/order quantity.


Did you already try option a. with live data and run into problems?
[2025-06-04 03:23:59]
codac99 - Posts: 9
Hi User431178,

I believe even with the minimum update interval of 10ms being set for the chart, we will still lose insightful updates that ruin the required structure for our deep-learning model.

The live TCP output to the model must be sent at the same condition with the same format as the data that the model is trained on. Fortunately the data in the depth files matches the bulk MBO derived input data from Databento within 99% (this is acceptable) but without sychronicity in the live data we cannot deploy it.

Thanks for the help again.

Sierra Chart Support your opinion would be amazing, it has been a week now!
[2025-06-04 08:00:32]
User431178 - Posts: 711

I believe even with the minimum update interval of 10ms being set for the chart, we will still lose insightful updates that ruin the required structure for our deep-learning model.

Yes, that makes sense.

Option b., utilizing the time and sales (inc. bid/ask updated), would mean that you can log all the bid ask price changes (if that is all that you need).
The T&S data would be processed in batches at each chart update, i.e. all records between the current and previous update, so you would not lose the granularity.
[2025-06-04 08:09:30]
codac99 - Posts: 9
Will see how I go and let you know. I have just made a program that opens the depth file and every 5 seconds applies the new updates and logs to a text file the bid and ask prices when my condition is met. I am using this as the benchmark to try and get the TCP output from my ACSIL study synchronised. Will try and access current market depth using another method. Fingers crossed we have a win today.
[2025-06-08 03:53:31]
codac99 - Posts: 9
Sierra Chart "Support",

Given the complete absence of meaningful assistance, there is no need to respond to this inquiry should you ever get around to it within the next decade.

Expect this experience to be represented clearly in my evaluations of your platform.
Date Time Of Last Edit: 2025-06-08 03:56:22
[2025-06-08 09:40:54]
Sierra_Chart Engineering - Posts: 19916
We apologize, we had started an answer but did not finish it. Also, in a programming help thread like this, we will only look at the first post because once there is user to user interaction and it involves programming, that is skipped over. We simply will not look at it at all. That is fully outside the scope of our support.

Regarding the first post, the proper way to do this is to use the time and sales data:
ACSIL Interface Members - Functions: sc.GetTimeAndSales()


However, during a replay you will not have access to all the bid/ask data. Only what the bid and ask are during a trade.

Although there are recording modes to record the bid/ask updates:
Data Recording Modes


Expect this experience to be represented clearly in my evaluations of your platform.
Go ahead and do whatever evaluation you like. It is meaningless to us. Please post what we said here.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2025-06-08 09:43:20
[2025-06-08 09:47:26]
Sierra_Chart Engineering - Posts: 19916
Also, regarding this:
The live TCP output to the model must be sent at the same condition with the same format as the data that the model is trained on. Fortunately the data in the depth files matches the bulk MBO derived input data from Databento within 99% (this is acceptable) but without sychronicity in the live data we cannot deploy it.
What exactly are you doing? You cannot use data outside of Sierra Chart. This is a very serious violation of exchange rules and the license agreement! At this point, this is now under review by us.

And also, another user gave you extensive help, and their information is all very helpful. When it comes to programming help, that is outside the scope of our support. Basically this thread is simply outside the scope of our support.

And now, what you are doing is going to be reviewed.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2025-06-08 09:50:59
[2025-06-08 09:56:52]
codac99 - Posts: 9
Why ask what I am doing then claim it is a violation? This above quote clearly states I cannot deploy it if it hasn't synchronised with true data in the depth files. I have been in contact with the CME directly regarding licensing fees and use types for my specific use case.

I will tell you outright plain and simple... It is NOT a violation if no data has been redistributed from the machine, used commercially or accessed outside the scope of what I reasonably understood to be permitted under my non-professional license.

I’m genuinely disappointed with how this has been handled, especially given the lack of initial support and the quick escalation to a threat of investigation without first clarifying the concern.

Please cancel my subscription and data effective immediately, I am no longer interested in your service. I really have had enough headache from using the software already, please don't unneccessarily create another one by threatening me.
Date Time Of Last Edit: 2025-06-08 12:10:06
[2025-06-09 13:08:18]
SC Support - Posts: 1968
Your refund will be in the area come out in the area of $41.

We will process this today, but it may take up to 2 weeks to be credited back to you.
[2025-06-09 15:03:37]
John - SC Support - Posts: 40422
The refund of $41.00 has been processed on our end. As noted, it can take up to 10 business days for the funds to show on your card.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account