home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / t / tas501.zip / DJINDEX.TAS < prev    next >
Text File  |  1993-03-07  |  691b  |  25 lines

  1. #TITLE Computes the Dow Jones Average from component securities
  2. #max_quotes 10
  3. { DJINDEX.TAS
  4.     Compute Dow Jones Industrial Average and Volume
  5.     Divisor valid as of 3/1/91
  6. }
  7. DIVISOR := 0.5046074;
  8. DJVOL := DJVOL + Volume of Today;
  9. DJIA := DJIA + Close of Today;
  10. IF Close Of Today > Close Of Yesterday THEN
  11.     DJUP := DJUP+1;
  12. IF Close Of Today < Close Of Yesterday THEN
  13.     DJDN := DJDN+1;
  14. WriteLn('Processing ',Ticker);
  15. { When all stocks in the ticker list have been read, print the
  16.   results
  17. }
  18. EpiLog Begin
  19.     DJIA := DJIA/DIVISOR;
  20.     WriteLn('DJIA IS ',DJIA,
  21.         ' VOLUME IS ',DJVOL,
  22.         ' UP TICKS ',INT(DJUP),
  23.         ' DOWN TICKS',INT(DJDN));
  24. End;
  25.