home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
t
/
tas412.zip
/
PA1.TAS
< prev
next >
Wrap
Text File
|
1992-12-17
|
3KB
|
108 lines
{ PA1.TAS
Script to create Performance Analytics report 1
The Week in Review
Top Ten Positive % Change Top Ten Negative % Change
Top Ten $ Gainers Top Ten $ Losers
Top Ten Volume % Gainers for Week
Top Ten Technical Improvement Top Ten Technically Deteriorating
}
#output_file pa1.lst N
#max_quotes 100
if quote_count < 100 Then Goto notEnough;
customer = '****Your Name Here****';
if period = 0 then
period = 5; { use a 5 day period by default}
gosub BinaryWave;
pctchg = roc(c,period,'%');
dolchg = roc(c,period,'$');
volchg = roc(sum(v,period),period,'%');
sortout(ticker,fullname,pctchg,dolchg,volchg,c,t_bwave,y_bwave,
{ 1 2 3 4 5 6 7 8 }
t_bwave-y_bwave);
{ 9 }
:NotEnough
if last_ticker = 0 then return;
page = 1;
gosub heading0;
rpttype = 'Positive % Change';
gosub heading1;
gosub heading2;
sorton(3,'D');
gosub listline;
rpttype = 'Negative % Change';
gosub heading1;
gosub heading2;
sorton(3,'A');
gosub listline;
gosub newpage;
rpttype = 'Dollar Gainers';
gosub heading1;
gosub heading2;
sorton(4,'D');
gosub listline;
rpttype = 'Dollar Losers';
gosub heading1;
gosub heading2;
sorton(4,'A');
gosub listline;
rpttype = '% Volume Gainers';
gosub heading1;
gosub heading2;
sorton(5,'D');
gosub listline;
gosub newpage;
rpttype = 'Technical Improvement';
gosub heading1;
gosub heading2;
sorton(9,'D');
gosub listline;
rpttype = 'Technical Deterioration';
gosub heading1;
gosub heading2;
sorton(9,'A');
gosub listline;
return;
:listline
for i=1; i <= 10; i = i+1;
begin
sortget(tickname,compname,pctchg,dolchg,volchg,currcls,
t_bwave,y_bwave,diff);
writeln(tickname,' ',compname,' ',
format(pctchg,' %6.2f%%'),
dolchg,
format(volchg,' %5.0f%%'),
currcls,
format(t_bwave,' %5.0f'),
format(y_bwave,' %5.0f'),
format(diff,' %5.0f'));
end;
return;
:newpage
writeln('\p');
page = page+1;
gosub heading0;
return;
:heading0
write('Performance Analytics - Report ID PA1');
writeln('\t\t\t\t\t\t\t\tPage ',format(page,'%2.0f'));
writeln('Prepared for ',customer,' on ',date);
writeln();
return;
:heading1
writeln();
writeln('\t\t\t\t\t\tTop Ten ',rpttype);
writeln('\t\t\t\t\t\tFor Week Ending ',datestr(dates[0]));
writeln();
return;
:heading2
writeln('\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t--Performance--');
writeln('Ticker Company or Percent Dollar Volume Current Week');
writeln('Symbol Security Name Change Change Change Close Today Ago Change');
writeln('-------- ----------------- ------- ------- ------ ------- ----- ----- -----');
writeln();
return;
#INCLUDE PA1A.INC