Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 20:43:57 +0000



Post From: How to display array in message log in ACSIL?

[2024-02-12 18:14:58]
User285179 - Posts: 14
  SCString msg;
  SCFloatArray Volume;
  const s_VolumeAtPriceV2 *VAP=NULL;
  int Volume_Levels = sc.VolumeAtPriceForBars->GetSizeAtBarIndex(sc.Index-1);

  // Do data processing
  for (int VAPIndex = 0; VAPIndex < Volume_Levels; VAPIndex++)
  {
    if (!sc.VolumeAtPriceForBars->GetVAPElementAtIndex(sc.Index-1, VAPIndex, &VAP))
      break;

    Volume[VAPIndex] = VAP->Volume;
}
  
  msg.Format("Volume = %f", Volume[0]);
  sc.AddMessageToLog(msg,1);
  

I want to get Volume At Price array of 2nd bar so I wrote (sc.Index-1) and I want to access that Array elements.