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

  1. {
  2.    SCRIPT : VOLBRK.TAS
  3.    Author : Peter Ross
  4.      Date : 12/12/91
  5.  
  6.    Modifications: Frank Wolynski
  7.      Date : 02/09/92
  8.    Modifications were made to Peters TAS file to allow single line
  9.    printouts of the security. Also rearranged prior close & current close
  10.    and included percentage change for the day. Since only securities
  11.    exhibiting the necessary volume breakout percentages were allowed
  12.    through the test, it was not necessary to identify the securities
  13.    as having done so.
  14.  
  15. This script will SCREEN for volume breakouts of stocks that closed at the
  16. same or higher than yesterday, and are 15% or less from their 52 week high.
  17. In addition, it will ALERT you to those stocks that have had a 30 day price
  18. breakout, and when a new high has been reached.
  19. NOTE: STOCKS IN DATABASE WITH LESS THAN 262 QUOTES WILL NOT BE FLAGGED.
  20. }
  21. #MAX_QUOTES 262
  22. #OUTPUT_FILE 'VOLBRK.LST+'
  23. { #SCAN_DATE '920206' }
  24. { Parameter settings follow.
  25.   These parameters can be changed to suit you.
  26. }
  27. PRICE_BREAKOUT_PERIOD = 30;     { Price breakout lookback period}
  28. VOL_BREAKOUT_PERIOD = 30;       { Volume breakout lookback period}
  29. VOL_PERCENT         = 150;      { Percentage for VOLUME BREAKOUT}
  30. { Declare various arrays to hold the results of indicators  }
  31. HHV_A : ARRAY;    { Place to save HHV}
  32. VOL_A : ARRAY;    { Place to save Volume Moving average}
  33. HHV_A = HHV(C,PRICE_BREAKOUT_PERIOD);
  34. VOL_A = MOV(V,VOL_BREAKOUT_PERIOD,'S');
  35. PRICE_BREAKOUT = 0;
  36. VOL_BREAKOUT   = 0;
  37. {The next few values are for finding the percentage from the 52 week high.
  38. }
  39. if quote_count < 2 then
  40. return;
  41. high_value := HHV(h,52*5);        { compute high over 52 weeks }
  42. off_high_value := ((high_value - c[0]) / high_value) * 100;
  43. day_change := ((c[0] - c[-1]) / c[-1]) * 100;
  44. if  CLOSE OF TODAY IS GREATER THAN HHV_A OF YESTERDAY THEN
  45.     begin
  46.       PRICE_BREAKOUT = 1;
  47.     end;
  48. if VOLUME OF TODAY IS GREATER THAN
  49.    VOL_PERCENT/100 * VOL_A OF YESTERDAY THEN
  50.     begin
  51.       VOL_BREAKOUT = (VOLUME OF TODAY/VOL_A OF YESTERDAY) * 100;
  52.     end;
  53. IF FIRST_TICKER THEN
  54. begin
  55. TOTAL := 0;               {Total Companys in your Directors}
  56. WRITELN(
  57. '                           Prev    Curr  Price  Curr   OFF'
  58. );
  59. WRITELN(
  60. 'TICKER  NAME              CLOSE    CLOSE Change Vol %  HIGH'
  61. );
  62. WRITELN(
  63. '------------------------ ------- ------- ------ -----  ----'
  64. );
  65. end;
  66. TOTAL := TOTAL + 1;
  67. IF VOL_BREAKOUT AND OFF_HIGH_VALUE < 16
  68.    AND CLOSE OF TODAY >= CLOSE OF YESTERDAY
  69.     THEN
  70.      BEGIN
  71.       WRITE(ticker,fullname, close of yesterday,close,INT(day_change),'%',
  72.           INT(((volume/VOL_A[-1]))*100),'% ',INT(off_high_value),'%',' ');
  73.  
  74.       IF PRICE_BREAKOUT THEN
  75.          WRITE(INT(PRICE_BREAKOUT_PERIOD),'Day HI');
  76.       ELSE
  77.          WRITE('           ');
  78.  
  79.       IF high_value <= h then       { today's high is new high  }
  80.          write(' * NH');
  81.  
  82.       writeln();             { end the line with a 'newline'}
  83.      END;
  84.  
  85. IF LAST_TICKER THEN
  86. WRITELN('Total Companies Processed','  ',INT(TOTAL));
  87.