Support Board
Date/Time: Fri, 27 Nov 2026 14:19:36 +0000
[Programming Help] - Can chart T&S or market depth change during a single study function call (Denali)?
View Count: 303
| [2026-10-07 18:34:00] |
| User860690 - Posts: 14 |
|
We use the Denali data feed. Your documentation says market data processing for DTC-based feeds runs on a background thread, while study functions run on the main thread. During a single call into a study function, can the Time & Sales array returned by sc.GetTimeAndSales, or the market depth read through sc.GetBidMarketDepthEntryAtLevel, change? Or are data updates applied to the chart only between study function calls?
|
| [2026-10-07 22:07:22] |
| Sierra_Chart Engineering - Posts: 25501 |
|
The answer is no. The market depth data is a copy and a lock is placed on the Time and Sales data, until you are finished with it. So you really do want to return from the study function as quickly as possible when accessing Time and Sales data. That lock will cause, the market data processing thread to block until it is released.
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: 2026-10-08 07:24:36
|
| [2026-10-08 16:23:30] |
| User860690 - Posts: 14 |
|
Thanks, that’s clear. A follow-up on timing. When a study function is called, the market depth copy and the Time and Sales data: do they reflect the same point in the incoming data feed? Specifically: if a trade has already reduced the depth shown at a price in the copy returned by sc.GetAskMarketDepthEntryAtLevel / sc.GetBidMarketDepthEntryAtLevel, is that trade always already in the array returned by sc.GetTimeAndSales during the same call? Or can the depth copy include the effect of trades that only appear in Time and Sales on a later call (or the reverse)? And is the depth copy made once at the start of the study call, or at the moment the depth functions are called? |
| [2026-10-08 17:43:21] |
| Sierra_Chart Engineering - Posts: 25501 |
|
We do not know: Specifically: if a trade has already reduced the depth shown at a price in the copy returned by sc.GetAskMarketDepthEntryAtLevel / sc.GetBidMarketDepthEntryAtLevel, is that trade always already in the array returned by sc.GetTimeAndSales during the same call? Or can the depth copy include the effect of trades that only appear in Time and Sales on a later call (or the reverse)? This would require in-depth analysis, of how the CME MDP feed works. It is not something we are going to look into. Thinking about this some more, being the data is transmitted over networks, and market depth updates can arrive before trades, or possibly the other way around, we would not know, you are just simply going to have inconsistent behavior with what you are asking about. Yes: And is the depth copy made once at the start of the study call,
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: 2026-10-08 17:49:59
|
To post a message in this thread, you need to log in with your Sierra Chart account:
