home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / finance / tas515dm.zip / EXAMPLES.ZIP / DIVUPS.TAS < prev    next >
Text File  |  1991-09-24  |  5KB  |  167 lines

  1. {
  2.         DIVUPS.TAS     PROC PROFIT TEST SCRIPT EXAMPLE
  3.         This script was written by Frank Wolynski in April 1991.
  4.         It 'encodes' various indicator relationships into a very
  5.         nicely formatted, extremely condense presentation.
  6.  
  7.         To run this script, you must set your SYMBOL TABLE SIZE to
  8.         15000 or so in the TAS CONFIGURATION SCREEN.
  9.  
  10. }
  11.  
  12. {#SCAN_DATE '910401'}          {Remove brackets & set date for back test}
  13. #MAX_QUOTES 150                 {Increase this # to amount going back}
  14. #OUTPUT_FILE 'DIVUPS.LST'       {Set file name to date for ease }
  15.  
  16. ob_ar : ARRAY;
  17. ad_ar : ARRAY;
  18. PR100 : ARRAY;
  19. PR26 : ARRAY;
  20. PR12 : ARRAY;
  21. Troc : ARRAY;
  22.  
  23. if quote_count > 102 then
  24. begin
  25. PR12 := ROC(C,12,'%');
  26. PR26 := ROC(C,26,'%');
  27. YPR26 := p[-1];
  28. Troc := ADD(PR12,PR26);
  29. PR100 := MOV(ROC(C,12,'%'),100,'s');
  30. m1troc := mov(Troc,10,'s');
  31. m5troc := mov(Troc,50,'S');
  32.  
  33. d_clo  := c - c[-1];
  34. S_A := STOCH(5,3);
  35. YS_A := p[-1];
  36. SL_A := STOCH(20,5);
  37. YSL_A := p[-1];
  38. avg_vol := cum(V)/quote_count;
  39. ob_ar := obv();                               {obv calcs}
  40. mob_ar := mov(ob_ar,50,'s');                  {MA of obv}
  41. ad_ar := ad();                                {Accum/Dist Calcs}
  42. mad_ar := mov(ad_ar,50,'s');
  43. ma5 := mov(c,50,'s');
  44. ma2 := mov(c,20,'s');
  45. ma1 := mov(c,10,'s');
  46. ma0 := c[0];
  47. sto := INT(SL_A);
  48.  
  49. if first_ticker then
  50. begin
  51.    writeln('---------------------------------------------------------------------------')
  52.    writeln('All Indicators are True                           P = PRoc Reversal')
  53.    writeln('Script File = DIVUPS.TAS                          V = Vol > Avg Vol')
  54.    writeln('                                                  O = Obv > 50 MA')
  55.    writeln('                                                  A = Acc/Dist > 50 MA')
  56.    writeln('                                                  * = 100MA of 12 PRoc > 0')
  57.    writeln('                                                  + = 10maTroc > 50maTroc')
  58.    writeln('---------------------------------------------------------------------------')
  59.    writeln('Security\t\t\tTClose\tChange   Sto  12R  26R  100T 50T   MAPos Flags')
  60.    writeln('---------------------------------------------------------------------------')
  61. end
  62.  
  63.  toda := 0;
  64.  
  65.  if (PR26 > YPR26) then
  66.     toda := toda + 1;
  67.  if (v > avg_vol) then
  68.     toda := toda + 1;
  69.  if (ob_ar > mob_ar) then
  70.     toda := toda + 1;
  71.  if (ad_ar > mad_ar) then
  72.     toda := toda + 1;
  73.  if (pr100 > 0) then
  74.     toda := toda + 1;
  75.  if (m1troc > m5troc) then
  76.     toda := toda + 1;
  77.  
  78.  IF (toda = 6) then
  79.   begin
  80.    write('  ',fullname,c,d_clo,INT(sto),' ',INT(PR12[0]),INT(PR26[0]),INT(PR100[0]),INT(m5troc),'\t');
  81.  
  82.    value := 1;
  83.    if (ma5 < ma2 and ma2 < ma1 and ma1 < ma0) then
  84.       begin
  85.       write('5210 ')
  86.       value := 0;
  87.       end
  88.    if (ma5 < ma1 and ma1 < ma2 and ma2 < ma0) then
  89.       begin
  90.       write('5120 ')
  91.       value := 0;
  92.       end
  93.    if (ma5 < ma2 and ma2 < ma0 and ma0 < ma1) then
  94.       begin
  95.       write('5201 ')
  96.       value := 0;
  97.       end
  98.    if (ma5 < ma0 and ma0 < ma2 and ma2 < ma1) then
  99.       begin
  100.       write('5021 ')
  101.       value := 0;
  102.       end
  103.    if (ma5 < ma0 and ma0 < ma1 and ma1 < ma2) then
  104.       begin
  105.       write('5012 ')
  106.       value := 0;
  107.       end
  108.    if (ma5 < ma1 and ma1 < ma0 and ma0 < ma2) then
  109.       begin
  110.       write('5102 ')
  111.       value := 0;
  112.       end
  113.    if (ma0 < ma5 and ma5 < ma1 and ma1 < ma2) then
  114.       begin
  115.       write('0512 ')
  116.       value := 0;
  117.       end
  118.    if (ma0 < ma1 and ma1 < ma5 and ma5 < ma2) then
  119.       begin
  120.       write('0152 ')
  121.       value := 0;
  122.       end
  123.    if (ma2 < ma5 and ma5 < ma1 and ma1 < ma0) then
  124.       begin
  125.       write('2510 ')
  126.       value := 0;
  127.       end
  128.    if (ma2 < ma5 and ma5 < ma0 and ma0 < ma1) then
  129.       begin
  130.       write('2501 ')
  131.       value := 0;
  132.       end
  133.    if (ma2 < ma1 and ma1 < ma5 and ma5 < ma0) then
  134.       begin
  135.       write('2150 ')
  136.       value := 0;
  137.       end
  138.    if (ma2 < ma1 and ma1 < ma0 and ma0 < ma5) then
  139.       begin
  140.       write('2105 ')
  141.       value := 0;
  142.       end
  143.    if (ma1 < ma2 and ma2 < ma0 and ma0 < ma5) then
  144.       begin
  145.       write('1205 ')
  146.       value := 0;
  147.       end
  148.    if (ma1 < ma0 and ma0 < ma2 and ma2 < ma5) then
  149.       begin
  150.       write('1025 ')
  151.       value := 0;
  152.       end
  153.    if (ma0 < ma1 and ma1 < ma2 and ma2 < ma5) then
  154.       begin
  155.       write('0125 ')
  156.       value := 0;
  157.       end
  158.  
  159.    if value = 1 then
  160.       write('.... ');
  161.  
  162.    write('PVOA*+');
  163.    writeln(' ')
  164.   end
  165.  
  166. END;
  167.