Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 05:11:58 +0000



Post From: Time and Sales Data Sequence Jumps

[2020-04-12 05:30:18]
yellowandy - Posts: 20
Hello, I have a study that is analyzing T&S data and noticed a big jump in sequence numbers while it was iterating over the array. The backtest was run with mode "Calculate at Every Tick/Trade" and the code for accessing the T&S was taken from the examples provided (and very straight forward). When I look at the T&S window itself it appears to be displaying everything correctly but hard to verify since I can't see the sequence number there and compare. Can this happen or am I perhaps missing data? Running version 2021 and doesn't seem to happen frequently but once in a while (at the same place though which is good).



  c_SCTimeAndSalesArray TimeSales;
  sc.GetTimeAndSales(TimeSales);
  int TimeSalesSize = TimeSales.Size();

  if (TimeSalesSize == 0)
    return; // No Time and Sales data available for the symbol

  // Loop through the Time and Sales
  int OutputArrayIndex = sc.ArraySize;

DebugMessage.Format("Total Time and Sales To Process %i", TimeSalesSize);
sc.AddMessageToLog(DebugMessage, 0);

s_TimeAndSales PreviousTimeAndSalesRecord;
s_TimeAndSales LatestTimeAndSalesRecord;

  for (int TSIndex = TimeSalesSize - 1; TSIndex >= 0; --TSIndex)
  {
//Doing some comparison here...