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 >
Wrap
Text File
|
1993-03-07
|
691b
|
25 lines
#TITLE Computes the Dow Jones Average from component securities
#max_quotes 10
{ DJINDEX.TAS
Compute Dow Jones Industrial Average and Volume
Divisor valid as of 3/1/91
}
DIVISOR := 0.5046074;
DJVOL := DJVOL + Volume of Today;
DJIA := DJIA + Close of Today;
IF Close Of Today > Close Of Yesterday THEN
DJUP := DJUP+1;
IF Close Of Today < Close Of Yesterday THEN
DJDN := DJDN+1;
WriteLn('Processing ',Ticker);
{ When all stocks in the ticker list have been read, print the
results
}
EpiLog Begin
DJIA := DJIA/DIVISOR;
WriteLn('DJIA IS ',DJIA,
' VOLUME IS ',DJVOL,
' UP TICKS ',INT(DJUP),
' DOWN TICKS',INT(DJDN));
End;