Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 17:06:03 +0000



sc 1212 s_ACSTrade ... not picking up non-simulated trades

View Count: 1332

[2014-11-15 03:11:52]
Kiwi - Posts: 375
Using the simple code below, if I set Trade Simulation ON, I pick up the length of the trades list and the ClosedProfitLoss of the last trade.

If I switch Trades Simulation OFF I get zero for the list length and the cpl on the last trade. I have sc.SendOrdersToTradeService = true and Auto Trading enabled. There are 14 trades showing in the activity log under Non-Simulated, the last one two days ago.

I suspect I have missed a setting. Could you please advise?


/***********************************************************************/
SCSFExport _scsf_xxNow(SCStudyGraphRef sc)
{
if (sc.SetDefaults) {
sc.GraphName="xxxHLC ";
sc.StudyDescription="xxx";
sc.Subgraph[0].Name="pandl";
sc.Subgraph[1].Name="size";
sc.GraphRegion=0;
sc.ScaleRangeType = SCALE_SAMEASREGION;
sc.SendOrdersToTradeService = true;
    sc.FreeDLL = 0;
return;
}

  std::vector <s_ACSTrade> TradesList;
  s_ACSTrade TradeEntry;
  int Size = sc.GetTradeListSize();
  
  if(Size > 0) {
    sc.Subgraph[1][sc.ArraySize-1] = Size;
    if(sc.GetTradeListEntry(Size - 1, TradeEntry)) {
      sc.Subgraph[0][sc.ArraySize-1] = TradeEntry.ClosedProfitLoss;
    }
  }
}



Date Time Of Last Edit: 2014-11-15 03:13:18
[2014-11-15 03:27:16]
Sierra Chart Engineering - Posts: 104368
Make sure you have Chart >> Chart Settings >> Advanced Settings >>Load Order Fills for Current Day Only unchecked.
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
[2014-11-15 03:36:34]
Kiwi - Posts: 375
That was it thank you.

(Noted for the next person searching for a problem with this).
[2014-11-15 15:00:09]
ejtrader - Posts: 688
kiwi - thanks for the code.

SC Team - Seems like this flag can't be set at the Global Level - would it be possible to add an ACSIL function for this?

Thanks

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

Login

Login Page - Create Account