Support Board
Date/Time: Mon, 25 Nov 2024 09:44:46 +0000
Order of data received by sc.GetTimeAndSales()
View Count: 216
[2024-03-11 22:39:45] |
autobahn - Posts: 25 |
My function requires quotes, trades and market depth to be processed in the correct order. When calling sc.GetTimeAndSales(), I have observed the following: a. Quote data and Trade data is accurate to the millisecond. b. Quote data always has microseconds set to 0. c. Within the same millisecond, Trade data has microseconds set to a sequential number staring at 0 for the first trade in that millisecond. d. Within the same millisecond, all quote data is sequenced first, then all trade data is sequenced after, irrespective of the true order of the quotes and trades within that millisecond. Questions: 1. Referring to (c): what happens if there are more than 1000 trades in the same millisecond? Does the millisecond increase by 1 on trade 1001, and would this result in an incorrect millisecond timestamp? 2. Within the same millisecond, are quotes guaranteed to be sequenced in order? 3. Within the same millisecond, are trades guaranteed to be sequenced in order? 4. Referring to (d): within the same millisecond, are all quotes guaranteed to be sequenced before all trades, irrespective of the true order of the quotes and trades within that millisecond? 5. During a study Update, Is it guaranteed that sc.GetBidMarketDepthEntryAtLevel() will always return a snapshot of the DOM after the last trade returned by sc.GetTimeAndSales()? Thank you. |
[2024-03-12 23:46:54] |
Sierra_Chart Engineering - Posts: 17172 |
In the array of Time and Sales records, all Bid/Ask records and Trade records are all in the correct order. This is definite. There is definitively no problem with the ordering. This conclusion is not accurate: d. Within the same millisecond, all quote data is sequenced first, then all trade data is sequenced after, irrespective of the true order of the quotes and trades within that millisecond.
You cannot look at the timestamps to determine the order. The data is already in the correct order regardless of what a timestamp is indicating. 1. No this does not happen. The highest microseconds go is 999. 2, 3, 4. This has already been answered above. The data is already in correct order. This is guaranteed. 5. The time and sales data actually could contain trades after the current market depth state. We can provide a timestamp in ACSIL of the latest market depth data. 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: 2024-03-12 23:47:35
|
[2024-03-12 23:57:20] |
Sierra_Chart Engineering - Posts: 17172 |
Use this function: sc.GetSymbolDataValue() And this parameter to get the last market depth update Date-Time SYMBOL_DATA_LAST_MARKET_DEPTH_UPDATE_DATE_TIME 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: