Put in some _TRACE commands to see if you're getting what you expect from the fgets.
If you still can't figure it out - I'll try to get it working Fri. d > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of murthysuresh > Sent: Thursday, June 19, 2008 8:41 PM > To: [email protected] > Subject: [amibroker] Re: getting a list of watchlists that my > symbol belongs to > > --- In [email protected], "dingo" <[EMAIL PROTECTED]> wrote: > > > > The only way I know is to read the ..Database\WatchLists\Index.txt > file > > using the fOpen/fGet.. functions. > > > > Then using a loop go down thru that list and check to see if any > > Database\WatchLists\entry + .Tls exists Then you can either do as > you > > described in step 2 or more simply - read each watch list to see if > it > > contains your current ticker. If it does write your title using the > name of > > the watch list file. > > > > d > > > > > -----Original Message----- > > > From: [email protected] > > > [mailto:[EMAIL PROTECTED] On Behalf Of murthysuresh > > > Sent: Wednesday, June 18, 2008 7:35 PM > > > To: [email protected] > > > Subject: [amibroker] getting a list of watchlists that my > > > symbol belongs to > > > > > > i want to print the list of watchlists my stock belongs to either > in > > > commentary or in title. here is the logic. i know how to do a few > > > things and dont know the rest and need some help. > > > > > > my algorithm is simple and basic > > > 1. get list of all watchlists in my app. dunno how to do this > > > 2. loop thro the list and check if symbol is in that > watchlist.use > > > INWATCHLISTNAME > > > 3. if 2 matchies, then Title=Title + WatchlistName > > > > > > > > > I could use some help for step 1. > > > REgads > > > > > > Seede > > > > > > > > > ------------------------------------ > > > > > > Please note that this group is for discussion between users only. > > > > > > To get support from AmiBroker please send an e-mail directly to > > > SUPPORT {at} amibroker.com > > > > > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > > > http://www.amibroker.com/devlog/ > > > > > > For other support material please check also: > > > http://www.amibroker.com/support.html > > > Yahoo! Groups Links > > > > > > > > > > > > No virus found in this incoming message. > > > Checked by AVG. > > > Version: 8.0.100 / Virus Database: 270.4.0/1507 - Release > > > Date: 6/18/2008 7:09 AM > > > > > > > ok. i have tried so far, it does not seem to work for me. pl let me > know if you find something incorrect in this. i tried to put this in > the commentary section. > > fh = fopen( "E:\\data\\Stocks\\WatchLists\\index.txt", "r"); > > if( fh ) > { > while( ! feof( fh ) ) > { > if(InWatchListName( wcName=fgets( fh ) )){ > printf(wcName); > } > > } > } > > else > { > printf("ERROR: file can not be found (does not exist)"); > } > > > > ------------------------------------ > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > Yahoo! Groups Links > > > > No virus found in this incoming message. > Checked by AVG. > Version: 8.0.100 / Virus Database: 270.4.0/1509 - Release > Date: 6/19/2008 8:00 AM >
