¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Scanning with IABSocketAPI in C++ Builder


Nick
 

¿ªÔÆÌåÓý

I doubt anyone here will be able to help since almost everyone uses one of the IB supplied libraries.

Your best best would be to contact the library developer if they are still around.


On 10/18/2021 1:23 PM, Colin B Maharaj wrote:


Hi,
I am using IABSocketAPI from hhssoftware.com and trying
to do a gap scanner. After months, I cant get the code working
Note: I dont do python, of Visual studio or Java. I got the hhssoftware
software component that I was able to successfully install in
C++ Builder , but I dont get a response from my event.

Below is the code I have to create the scanner.
and below that the onScannerData event

Any help will be appreciated thanks.


//------------------------------------------------------------------------------

TIABScanCriteria * ScanCriteria=NULL;
int ScanId = 2;
int sCount=0;

void __fastcall TForm4::InitScannerClick(TObject *Sender)
{
?? sCount=0;
?? ScanCriteria = new TIABScanCriteria;
?? ScanCriteria->StockTypeFilter = "CORP";
?? ScanCriteria->NumberOfRows = 20;
?? ScanCriteria->Instrument = "STK";
?? ScanCriteria->LocationCode = "STK.NYSE";
?? ScanCriteria->AbovePrice = 1.0;
?? ScanCriteria->BelowPrice = 15.0;
?? ScanCriteria->ScanCode = "TOP_PERC_GAIN";

?? ScannerSelect1->Enabled = false;
?? InitScanner->Enabled = false;
?? StopScanner->Enabled = true;


?? IABSocket1->Scanner->InitializeScanCriteria(ScanCriteria);
?? IABSocket1->Scanner->NewScan(ScanId, *ScanCriteria);

}

//---------------------------------------------------------------------------


void __fastcall TForm4::IABSocket1ScannerData(TObject *Sender, TIABScan *Scan)
{
?? int qr = Scan->Count+1;
?? if (qr==1) { qr=2; }
?? Grid2->RowCount =qr;
?? Label4->Caption = sCount++;

?? Grid2->Cells[0][0]="Symbol";
?? Grid2->Cells[1][0]="Rank";
?? Grid2->Cells[2][0]="MarketName";
?? Grid2->Cells[3][0]="TradingClass";
?? Grid2->Cells[4][0]="LocalSymbol";

?? for (int i = 0; i< Scan->Count; i++)
?? {
???? TIABScanResultItem * s = Scan->Items[i];
???? Grid2->Cells[0][i+1] = s->Symbol;
???? Grid2->Cells[1][i+1] = s->Rank;
???? Grid2->Cells[2][i+1] = s->MarketName;
???? Grid2->Cells[3][i+1] = s->TradingClass;
???? Grid2->Cells[4][i+1] = s->LocalSymbol;
?? }

}


Join [email protected] to automatically receive all group messages.