Login Page - Create Account

Support Board


Date/Time: Tue, 07 May 2024 07:16:51 +0000



Post From: ACSILDepthBars to get last data not always available

[2017-02-24 11:27:28]
wwwingman - Posts: 185
Hi

I am trying to use the ACSIL c_ACSILDepthBars data through the GetLastQuantity function.
There are moments (that can last few seconds) during which I have no data in the c_ACSILDepthBars (through DepthDataExstsAt) although I see changes on the DOM chart (1 data provider, IQFeed, no trading feed).
On the open of some bars I can wait 10-15 seconds before the data is available.
I adjusted my computer time, and this seem to happen less, but it clearly happens.

The core of the program is below (I am not asking for debugging.. the goal is to show it is simple and that I probably don't understand something right..).
Have I missed something ? Please advise.

-- W


if (sc.SetDefaults)
{
  ...
  sc.UpdateAlways = true;
}

c_ACSILDepthBars* _pDepthBars = sc.GetDepthBars();
if (_pDepthBars == NULL)
  return;

if (!_pDepthBars->DepthDataExstsAt(_currentBarIndex))
{
  logMsg.Format("_currentBarIndex<%d> NO Depth", _currentBarIndex);
  sc.AddMessageToLog(logMsg, 0);
  return;
}

int _priceTickIndex = _pDepthBars->GetBarLowestPriceTickIndex(_currentBarIndex);
do
{
  int _lastQuantity    = _pDepthBars->GetLastQuantity(_currentBarIndex, _priceTickIndex);
  ...
} while (_pDepthBars->GetNextHigherPriceTickIndex(_currentBarIndex, _priceTickIndex));