Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 23:06:29 +0000



v 1054 -

View Count: 1388

[2013-11-29 00:41:00]
Kiwi - Posts: 375
The line int Size = sc.GetTradeListSize(); is causing this error:

Warning: The Custom DLL study "KiEx._scsf_ControlEntries" has just caused a CPU exception. | 2013-11-29 10:37:13
Warning: This Custom DLL study may cause Sierra Chart to be unstable until you remove the study from your chart and restart Sierra Chart. | 2013-11-29 10:37:13

The chart has no history of live orders and gives the error when there were no sim orders but also after I'd created a couple in replay.




SCSFExport _scsf_ControlEntries(SCStudyGraphRef sc)
{
SCSubgraphRef o0 = sc.Subgraph[0], o1 = sc.Subgraph[1],
o2 = sc.Subgraph[2], o3 = sc.Subgraph[3],
o4 = sc.Subgraph[4], o5 = sc.Subgraph[5];

if (sc.SetDefaults)
{
sc.GraphName=" ";
sc.StudyDescription="Expt";
sc.Subgraph[0].Name="o1 ";
sc.Subgraph[1].Name="o2 ";
sc.Subgraph[2].Name="o3 ";
sc.Subgraph[3].Name="o3 ";
sc.Subgraph[4].Name="o4 ";
sc.Subgraph[5].Name="o5 ";

sc.GraphRegion=0;
sc.ScaleRangeType = SCALE_SAMEASREGION;
sc.CalculationPrecedence = VERY_LOW_PREC_LEVEL;
}
sc.FreeDLL=1;

bool killOrders = false;
int as = sc.ArraySize - 1;

  std::vector <s_ACSTrade> TradesList;
  s_ACSTrade TradeEntry;
  int Size = sc.GetTradeListSize();

  //for(int i = 0; i < Size;i++)
  //{
    //if(sc.GetTradeListEntry(i, TradeEntry))
      //TradesList.push_back(TradeEntry);
  //}

  //for (unsigned int i = 0, ti = TradesList.size() - 1; ti >= 0 ; i++, ti--)
  //{
//o4[as-i] = TradesList[ti].ClosedProfitLoss;
  //}



}


sc1054, wine, debian jessie
[2013-11-29 00:50:34]
Kiwi - Posts: 375
I basically just copied the example from the ACSIL trade page and then removed things to try to isolate what was causing the exception.

The error occurs when the study is added to the chart or when the chartbook is opened.


Edit: Note that although the message is still posted I am now using the code and it seems to work properly.
Date Time Of Last Edit: 2013-11-29 05:22:55
[2013-11-29 18:00:39]
Sierra Chart Engineering - Posts: 104368
This should be fixed in the next release. However, the problem is you are not returning at the bottom of the sc.SetDefaults code block.
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-11-29 21:35:53]
Kiwi - Posts: 375
Thanks. Been cutting and pasting a lot of old code and obviously missed that this time.

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

Login

Login Page - Create Account