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
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