Login Page - Create Account

Support Board


Date/Time: Fri, 27 Dec 2024 02:04:26 +0000



Post From: Live data versus replay data problem

[2016-02-17 17:00:28]
User55519 - Posts: 37
I'm still having a really hard time figuring out how to achieve what I want to do. Is there any way you can help me sort this out?

If you are saying that the 'last price' for each tick, that is located in the intraday data storage is not accessible to ACSIL on a tick basis in real-time, then what is an alternative?

I think it would be this; If I cycle through the Time and Sales data, then I'm want to examine the bid and ask price of each tick. Since the last time my study was called. I think I have the code (below) to cycle through Time and Sales data. But I'm missing the basic code to retrieve the bid and ask price during each iteration of the while loop. There is not much in the documentation on this. Can you provide assistance on this?

Thanks


  if ( sc.Index < sc.ArraySize-1 ) return;

  SCTimeAndSalesArray TimeSales;
  sc.GetTimeAndSales(TimeSales);

  if (TimeSales.GetArraySize() == 0) return;

  int TSIndex = TimeSales.GetArraySize() - 1;

  while((TSIndex > 0) && (ColorBar[sc.Index]!=1))
  {
  SCDateTime TradeDateTime = COMBINE_DATE_TIME(TimeSales[TSIndex].Date, HMS_TIME(TimeSales[TSIndex].Hour, TimeSales[TSIndex].Minute, TimeSales[TSIndex].Second));
    TradeDateTime += sc.TimeScaleAdjustment;
    
    if (TradeDateTime < sc.BaseDateTimeIn[sc.Index]) break;
  }