home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / t / tas501.zip / PCTF.TAS < prev    next >
Text File  |  1993-02-25  |  683b  |  34 lines

  1. #TITLE Script to calculate %F as described in TASC May 92 (T. Chande) 
  2. #output_file f%.lst
  3. #max_quotes 100
  4. { Script to calculate %F as described by
  5.   Tushar Chande in the May 1992 issue of TASC 
  6.  
  7.   %F = Today's Close - The 5 day TSF of yesterday
  8.        ------------------------------------------    * 100
  9.                    Today's Close
  10.  
  11.   This script illustrates the use of the REF function to shift a series
  12.   or array forward.
  13.  
  14. }
  15. pctF : array;
  16. tsfA : array;
  17. tsfA = tsf(C,5);
  18.  
  19. pctF = mulBy( div( ( sub( C,REF( tsfA,-1 ) ) ),C ) , 100 );
  20. {dump_array(c,tsfA,pctf);
  21. return;}
  22. openGraph(2);
  23. sizeGraph(2,1);
  24. Graph(1);
  25. Graph(pctF,'Chandes %F');
  26. closeGraph();
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.