Login Page - Create Account

Support Board


Date/Time: Wed, 18 Feb 2026 05:10:02 +0000



Post From: GetTimeAndSales & ReadIntradayFileRecordAtIndex discrepancy

[2026-02-17 21:09:39]
Asad1939 - Posts: 13
Hi

From the docs: To access individual trades and bid/ask updates in between calls into the study function, use the following functions:

sc.GetTimeAndSales
sc.ReadIntradayFileRecordAtIndex

I am wondering why data from these two functions is different.

My understanding is that sc.ReadIntradayFileRecordAtIndex returns all trades that occurred within the start and end time of a bar.

Theoretically we should be able to get these trades from GetTimeAndSales by filtering s_TimeAndSales::Type on SC_TS_BID and SC_TS_ASK and the timestamp on the start and end time of a bar.

The problem is, I obtain two very different results. There are many more trades reported from GetTimeAndSales (almost double in some cases) than ReadIntradayFileRecordAtIndex.

Can you confirm for me my understanding of these two functions is correct, that is they should return the same trade list?

Or is there other filters that need to be applied to GetTimeAndSales so that it matches the result from ReadIntradayFileRecordAtIndex (aside from the 3 mentioned)

Thanks
Date Time Of Last Edit: 2026-02-17 21:12:05