home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
finance
/
tas515dm.zip
/
EXAMPLES.ZIP
/
NDXCOMPA.TAS
< prev
next >
Wrap
Text File
|
1992-12-26
|
1KB
|
48 lines
{
NDXCOMP.TAS => NDXCOMP.LST
This script looks at the performance of your stocks and
chosen index.
You may change the time of the performance by changing the
MAX_QUOTES line to the time you prefer, it is set for 10
days.
You may also change the index by changing the INDEX line to
the ticker you want to compare with. SP-500 is suggested
for all round performance, it is now on the DOW 30.
This script has changed a lot because the power of TAS has
grown allowing smaller scripts and greater speed.
Jerry Green 12/26/92
}
#MAX_QUOTES 10
#INDEX 'DJ-30'
#OUTPUT_FILE 'NDXCOMP.LST+' n
if first_ticker then
writeln(DATE);
IPF : ARRAY;
TPF : ARRAY;
IPF = PER1(INDEX);{ Calculate performance of index}
TPF = PER(); { Calculate performance of ticker}
qc = QUOTE_COUNT;
SORTOUT(TICKER,C,TPF);
if last_ticker then
BEGIN
SORTON(3,'d');
writeln('These are the 5 best performers.');
gosub CONCLUDE;
SORTON(3,'a');
writeln();
writeln('These are the 5 worst performers.');
gosub CONCLUDE;
goto FINI;
:CONCLUDE
writeln('NAME LAST CLOSE '+format(qc,'%3.0f'),
' DAY PERFORMANCE');
for i = 1; i <= 5; i = i + 1;
begin
SORTGET(NAM,CLE,PRF);
writeln(NAM,CLE,' ',PRF);
end;
RETURN;
END;
:FINI
END;