Login Page - Create Account

Support Board


Date/Time: Fri, 22 Nov 2024 18:35:39 +0000



GetTradeList cpu exception

View Count: 1719

[2013-05-21 06:53:09]
onnb - Posts: 662
I am getting a cpu exception with GetTradeList. It comes by just adding the study to a chart.
The size of the list is 4293719478 (from the debugger)

Code used is below.
Any ideas?


std::vector<s_ACSTrade> tradeList;
sc.GetTradeList(tradeList);

for (int i = 0; i < tradeList.size(); i++)
{
  SCDateTime closeDT = tradeList[i].CloseDateTime;
  
  int index = sc.GetContainingIndexForSCDateTime(sc.ChartNumber, closeDT);
  equity[index] = tradeList[i].ClosedProfitLoss;
}

[2013-05-21 07:02:44]
Sierra Chart Engineering - Posts: 104368
We will check on this and resolve it.
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
[2013-05-21 14:11:01]
Al SC Developer - Posts: 434
We do not see any issues with this routine. Where are you taking the exception? In the GetTradeList() call, or after in your loop?

One thing to note, is that TradeList.size() call will return a size_t (unsigned int), and you are using an int for the index.

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

Login

Login Page - Create Account