Backfilling of N symbols

We are writing our own data plugin to feed data into AB from our source. We have problem when backfilling of N symbols using (Buy=1). Problem description.

  1. There are 3 symbols added to watchlist namely A, B and C. Symbol A loaded in Chart
  2. When we scan using, Plugin receives ‘GetQuotesEx(…)’ call for symbols(A,B,C) and we pull data one by one in background(async).
  3. We are issuing WM_USER_STREAMING_UPDATE for those symbols completed downloading eg(WPARAM A/B/C, LPARAM BarReady flag set).
  4. Now, we are getting call back of ‘GetQuotesEx’ for the symbol loaded on chart(ie, A only) for all WM_USER_STREAMING_UPDATE
  5. We are not able to push data to AB for symbol B and C, even though the plugin downloaded it.

What was we are missing or the right way to handle this scenario.
Thanks in advance.


For start, read this please:

This provides information how you should run scans to WAIT for backfills. Secondly your plugin needs to implement flagging symbol as “incomplete” while the backfill is NOT completed.
To mark symbol as incomplete you need to set this flag: RI_STATUS_INCOMPLETE in the nStatus field of RecentInfo structure.

struct RecentInfo *ri = GetRecentInfoForSymbol();
ri->nStatus |= RI_STATUS_INCOMPLETE; // set the flag, backfill is NOT complete
ri->nStatus &= ~RI_STATUS_INCOMPLETE; // clear the flag, backfill is complete