Login Page - Create Account

Support Board


Date/Time: Sat, 28 Jun 2025 02:31:01 +0000



[Programming Help] - Time and Sales data - recalculation problem

View Count: 827

[2021-09-12 10:39:38]
User411647 - Posts: 21
Dear support

I am working on study based on Time and sales data

When I want to change study settings or any change so SC stop working during recalculation

After restart SC I have to temporarily disconnect datafeed and then open chartbook, connect datafeed to make it work

So changes are possible when disconnect datafeed

c_SCTimeAndSalesArray TimeSales;
  sc.GetTimeAndSales(TimeSales);
  if (TimeSales.Size() == 0)
    return;

for (int TSIndex = mojIndex - 1; TSIndex >= 0; --TSIndex)
..................................

[2021-09-12 12:58:11]
Sierra Chart Engineering - Posts: 104368
We do not understand what your question is.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-09-12 13:12:31]
User411647 - Posts: 21
why sierra freezes when i use my custom study ???
Date Time Of Last Edit: 2021-09-12 13:30:25
[2021-09-15 15:48:51]
Sierra Chart Engineering - Posts: 104368
You need to check the processing of the study and make sure it is efficient when processing the time and sales data.

Can clearly it is taking too much CPU time and not efficient.

You need to minimize the number of time and sales records getting processed at once.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2021-09-15 15:49:32
[2021-09-15 17:14:09]
User411647 - Posts: 21
Thanks for advice

is it related to this?

// Zero elements from the first index that was written to last time, to the
  // first index that was written to this time.
  for (int SubgraphIndex = 0; SubgraphIndex < sc.NumberOfArrays; ++SubgraphIndex)
  {
    for (int DataIndex = EarliestIndex; DataIndex < OutputArrayIndex; ++DataIndex)
      sc.Subgraph[SubgraphIndex][DataIndex] = 0.0f;
  }
  
  // Store the last index that was written to
  EarliestIndex = OutputArrayIndex;

if you allow me, I will send you a private message with the complete code
Date Time Of Last Edit: 2021-09-15 20:01:02
[2021-09-16 17:03:54]
User411647 - Posts: 21
I set the number of time and sales records to a minimum and it has no effect
Date Time Of Last Edit: 2021-09-16 17:07:33

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

Login

Login Page - Create Account