Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 21:54:02 +0000



Post From: sc 1212 s_ACSTrade ... not picking up non-simulated trades

[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