home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / finance / tas515dm.zip / EXAMPLES.ZIP / TOMR.TAS < prev    next >
Text File  |  1992-01-29  |  3KB  |  75 lines

  1. {TOMR.TAS  =>  NEWHIGHS.LST
  2.  This script finds stocks with new highs and trading in a
  3.  range for 30 days within 15%.  The values are listed to
  4.  the screen with the chart.  Varible days are loaded due to
  5.  differing amounts in database.
  6.  created on a suggestion by Tom Rategan.
  7.  written by Jerry Green 1-22-92
  8.  revised 1/27/92 to catch hew high narrow trading band.
  9.  #max_quotes 265
  10.  {********** Swap braces on output file to print **********}
  11.  #output_file 'NEWHIGHS.LST'
  12.  {#output_file  LPT1.PRN}
  13.  {**********     No stocks less than 30 days     **********}
  14.  if quote_count < 30 then
  15.  return;
  16.  {**********             Print a header          **********}
  17.  if first_ticker then
  18.  begin
  19.  writeln('Symbol   Name                 Todays             PercentOf');
  20.  writeln('                           Close   Volume      High   50DMAVol');
  21.  end;
  22.  {**********              Creat arrays          **********}
  23.  hi_valqc : array;
  24.  hi_val30 : array;
  25.  lo_val30 : array;
  26.  vo_val50 : array;
  27.  qc = (quote_count - 5);
  28.  hi_valqc = hhv(c,qc);
  29.  hi_val30 = hhv(c,30);
  30.  lo_val30 = llv(c,30);
  31.  vo_val50 = mov(v,50,'s');
  32.  hi_base = 0;
  33.  nu_hi = 0;
  34.  base_30 = 0;
  35.  {**********       High to close ratio         **********}
  36.  nu_hival = (c/hi_valqc) * 100;
  37.  {**********        Trading range              **********}
  38.  td_rng = (1-(lo_val30/hi_val30)) * 100;
  39.  {**********       High to close 30 days       **********}
  40.  nu_hiv30 = (c/hi_val30) * 100;
  41.  {**********       Volume to VolMA ratio       **********}
  42.  vo_pcnt = (v/vo_val50) * 100;
  43.  {**********     Filter and find qualifiers    **********}
  44.  if nu_hival >= 97  and td_rng <= 15 then
  45.     hi_base = 1;
  46.  if nu_hival >= 97  and td_rng > 15 then
  47.     nu_hi = 1;
  48.  if nu_hival < 97 and nu_hiv30 >= 97 and td_rng <= 15 then
  49.     base_30 = 1;
  50.  if hi_base = 1 or nu_hi = 1 or base_30 = 1
  51.     then gosub graphit;
  52.  return;
  53.  {********** Graph and list High Trading bands **********}
  54.  :graphit
  55.  if hi_base = 1 then
  56.  writeln(ticker,fullname,' ',c,' ',v,'   ',int(nu_hival),' ',
  57.  int(vo_pcnt),'  HI BASE');
  58.  if nu_hi = 1 then
  59.  writeln(ticker,fullname,' ',c,' ',v,'   ',int(nu_hival),' ',
  60.  int(vo_pcnt),'  NEW HI');
  61.  if base_30 = 1 then
  62.  writeln(ticker,fullname,' ',c,' ',v,'   ',int(nu_hival),' ',
  63.  int(vo_pcnt),'  RANGE =',td_rng,'%');
  64.  opengraph(2,-qc,0);
  65.  sizegraph(5,2);
  66.  graph(1,''+format(c[0],'$%6.2f')+' is '
  67.  +format(nu_hival,'%5.2f%')+' of '
  68.  +format(hi_valqc[0],'$%6.2f')+' high of past '
  69.  +format(qc,'%4.f')+' days with '+format(td_rng,'%5.2f%')+
  70.  ' 30 day trading range',mov(c,50,'s'),'50 DMAS');
  71.  graph(v,'Volume is '+format(vo_pcnt,'%5.2f%')+
  72.  ' of',vo_val50,'50 DMA Simple');
  73.  closegraph();
  74.  return;
  75.