home *** CD-ROM | disk | FTP | other *** search
- { PERFCHK.TAS ( Author Martin Moore)
- Script to print out the performance of certain stocks since a particular
- day. To add a ticker and date to the list of stocks to be tracked, just
- put a line like this in:
- if TICKER = 'tickername' then find_date = yyddmm.0 else
- where 'tickername' is the stock ticker surrounded by quotes and
- 'yymmdd' is the year, month and day. Be sure to include the
- ".0" after the date (see documentation on size of INTEGERs
- }
- if FIRST_TICKER then
- BEGIN
- writeln(' CURRENT PERCENT POINTS SINCE');
- writeln('TICKER CLOSE CHANGE CHANGE DATE');
- END;
-
- if TICKER = 'AMGN' then find_date = 910502.0 else
- if TICKER = 'IBM' then find_date = 900802.0 else
- if TICKER = 'AAPL' then find_date = 900802.0 else
- RETURN; { no matching stock ticker..just return}
- date_found_sw = 0; { indicate date not yet found}
- i = 0; { search backwards for date match}
- :DATE_LOOKUP
- if dates[i] = find_date then goto DATE_FOUND;
- i = i - 1; { backup one day's index}
- if i = -quote_count then return; { date not found..should not happen, Ken!}
- goto DATE_LOOKUP; { go back and check prior day}
- :DATE_FOUND
- writeln(TICKER,C,ROC(C,-i,'%'),'% ',ROC(C,-i,'$'),' ',
- datestr(dates[i]));
-
-